__construct()
__construct(\Pico $pico)
Constructs a new instance of a Pico plugin
Parameters
\Pico | $pico | current instance of Pico |
Common interface for Pico plugins
For a list of supported events see \DummyPlugin; you can use \DummyPlugin as template for new plugins. For a list of deprecated events see \PicoDeprecated.
If you're developing a new plugin, you MUST both implement this interface
and define the class constant API_VERSION
. You SHOULD always use the
API version of Pico's latest milestone when releasing a plugin. If you're
developing a new version of an existing plugin, it is strongly recommended
to update your plugin to use Pico's latest API version.
__construct(\Pico $pico)
Constructs a new instance of a Pico plugin
\Pico | $pico | current instance of Pico |
setEnabled(boolean $enabled, boolean $recursive = true, boolean $auto = false) : void
Enables or disables this plugin
boolean | $enabled | enable (TRUE) or disable (FALSE) this plugin |
boolean | $recursive | when TRUE, enable or disable recursively. In other words, if you enable a plugin, all required plugins are enabled, too. When disabling a plugin, all depending plugins are disabled likewise. Recursive operations are only performed as long as a plugin wasn't enabled/disabled manually. This parameter is optional and defaults to TRUE. |
boolean | $auto | enable or disable to fulfill a dependency. This parameter is optional and defaults to FALSE. |
thrown when a dependency fails
getPico() : \Pico
Returns the plugins instance of Pico
the plugins instance of Pico