Plugin
in package
Plugin is used to load and locate plugins.
It also can retrieve plugin paths and load their bootstrap and routes files.
Tags
Table of Contents
Properties
- $plugins : PluginCollection|null
- Holds a list of all loaded plugins and their configuration
Methods
- classPath() : string
- Returns the filesystem path for plugin's folder containing class files.
- configPath() : string
- Returns the filesystem path for plugin's folder containing config files.
- getCollection() : PluginCollection
- Get the shared plugin collection.
- isLoaded() : bool
- Returns true if the plugin $plugin is already loaded.
- loaded() : array<string|int, string>
- Return a list of loaded plugins.
- path() : string
- Returns the filesystem path for a plugin
- templatePath() : string
- Returns the filesystem path for plugin's folder containing template files.
Properties
$plugins
Holds a list of all loaded plugins and their configuration
protected
static PluginCollection|null
$plugins
Methods
classPath()
Returns the filesystem path for plugin's folder containing class files.
public
static classPath(string $name) : string
Parameters
- $name : string
-
name of the plugin in CamelCase format.
Tags
Return values
string —Path to the plugin folder containing class files.
configPath()
Returns the filesystem path for plugin's folder containing config files.
public
static configPath(string $name) : string
Parameters
- $name : string
-
name of the plugin in CamelCase format.
Tags
Return values
string —Path to the plugin folder containing config files.
getCollection()
Get the shared plugin collection.
public
static getCollection() : PluginCollection
This method should generally not be used during application runtime as plugins should be set during Application startup.
Return values
PluginCollectionisLoaded()
Returns true if the plugin $plugin is already loaded.
public
static isLoaded(string $plugin) : bool
Parameters
- $plugin : string
-
Plugin name.
Tags
Return values
boolloaded()
Return a list of loaded plugins.
public
static loaded() : array<string|int, string>
Return values
array<string|int, string> —A list of plugins that have been loaded
path()
Returns the filesystem path for a plugin
public
static path(string $name) : string
Parameters
- $name : string
-
name of the plugin in CamelCase format
Tags
Return values
string —path to the plugin folder
templatePath()
Returns the filesystem path for plugin's folder containing template files.
public
static templatePath(string $name) : string
Parameters
- $name : string
-
name of the plugin in CamelCase format.
Tags
Return values
string —Path to the plugin folder containing template files.