constructor
Plugin
Plugin
(
string $name
)
List of parameters:
Name |
Type |
Description |
$name |
string |
a humean readable, unique identifier for this instance |
Description:
Creates a new instance. When reimplementing this function, note that you should at least set the private name attribute, as this serves as an id and therefore it is essential to communicate with other plugins.
get the name of a plugin
string
getName
()
Description:
The "name" of a plugin is also a unique identifier for it. This means it is an alphanumeric, lower-cased string. Plugin names can also be used to communicate with the PluginManager singleton class to reference to a specific plugin.
«abstract» default event handler
bool
_default
(
string $event, array $ARGS
)
List of parameters:
Name |
Type |
Description |
$event |
string |
identifier of the occured event |
$ARGS |
array |
list of arguments |
Description:
Since this is an abstract function it should be reimplemented in all subclasses