Skip to content
Andy Theuninck edited this page Feb 25, 2015 · 2 revisions

Plugins in POS are collections of classes that will only be loaded if the plugin is enabled. In some cases like input parsing, all classes that descend from a given parent class are automatically loaded when POS runs. This kind of module becomes functional as soon as the plugin is enabled. In other cases, classes provided by a plugin will show up in configuration options where a user can choose one of the default classes or a replacement provided by a plugin.

At minimum, a plugin should have:

  • A directory under pos/is4c/plugins/
  • And a class extending Plugin whose name matches the directory
    • For example, a plugin folder named "MyPlugin" should contain a file named "MyPlugin.php" which defines the class "MyPlugin".

The remainder of the plugin file/directory structure is entirely up to the author.

Plugins should be free of side-effects when included. The unit test PluginsTest.php will verify all plugins (enabled or not).

Clone this wiki locally