메소드 | 설명 | |
---|---|---|
__construct ( Pico $pico ) | Constructs a new instance of a Pico plugin | |
getDependants ( ) : object[] | Returns a list of plugins which depend on this plugin | |
getDependencies ( ) : string[] | Returns a list of names of plugins required by this plugin | |
getPico ( ) : Pico | Returns the plugins instance of Pico | |
handleEvent ( string $eventName, array $params ) : void | Handles a event that was triggered by Pico | |
isEnabled ( ) : boolean | Returns true if this plugin is enabled, false otherwise | |
isStatusChanged ( ) : boolean | Returns true if the plugin was ever enabled/disabled manually | |
setEnabled ( boolean $enabled, boolean $recursive = true, boolean $auto = false ) : void | Enables or disables this plugin |
public __construct ( Pico $pico ) | ||
$pico | Pico | current instance of Pico |
public getDependants ( ) : object[] | ||
리턴 | object[] | dependant plugins |
public getDependencies ( ) : string[] | ||
리턴 | string[] | required plugins |
public getPico ( ) : Pico | ||
리턴 | Pico | the plugins instance of Pico |
public isStatusChanged ( ) : boolean | ||
리턴 | boolean | plugin is in its default state (true), false otherwise |
public setEnabled ( boolean $enabled, boolean $recursive = true, boolean $auto = false ) : void | ||
$enabled | boolean | enable (true) or disable (false) this plugin |
$recursive | boolean | 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. |
$auto | boolean | enable or disable to fulfill a dependency This parameter is optional and defaults to false. |
리턴 | void |