All framework classes have been renamed to use the SihnonFramework_ prefix. The class autoloader now looks for subclasses of the framework classes in the Sihnon_Lib directory, and automatically creates them if they don't exist. The autoloader correctly creates interfaces and abstract classes as needed, by using reflection to check the type of the parent class. All references to classes within the framework now use the Sihnon_ prefix. The PluginFactory supports multiple scan directories, and will search both the framework and subclass class tree to find candidate plugins.
30 lines
530 B
PHP
30 lines
530 B
PHP
<?php
|
|
|
|
/**
|
|
* Base class for all plugins, providing default implementations for
|
|
* standard plugin methods.
|
|
*
|
|
* @class SihnonFramework_PluginBase
|
|
*/
|
|
class SihnonFramework_PluginBase {
|
|
|
|
/**
|
|
* Provides a basic initialisation function that does nothing.
|
|
*
|
|
*/
|
|
public static function init() {
|
|
// Nothing to do
|
|
}
|
|
|
|
/**
|
|
* Returns the name of this plugin
|
|
*
|
|
* @return string
|
|
*/
|
|
public static function name() {
|
|
return static::PLUGIN_NAME;
|
|
}
|
|
|
|
}
|
|
|
|
?>
|