| | |
| | | class rcube_plugin_api |
| | | { |
| | | static private $instance; |
| | | |
| | | |
| | | public $dir; |
| | | public $url = 'plugins/'; |
| | | public $output; |
| | | public $config; |
| | | |
| | | public $allowed_prefs = array(); |
| | | public $allowed_session_prefs = array(); |
| | | |
| | | public $handlers = array(); |
| | | private $plugins = array(); |
| | | private $tasks = array(); |
| | |
| | | ) { |
| | | $plugin->init(); |
| | | $this->plugins[$plugin_name] = $plugin; |
| | | } |
| | | if (!empty($plugin->allowed_prefs)) { |
| | | $this->allowed_prefs = array_merge($this->allowed_prefs, $plugin->allowed_prefs); |
| | | } |
| | | return true; |
| | | } |
| | |
| | | |
| | | |
| | | /** |
| | | * Returns list of loaded plugins names |
| | | * |
| | | * @return array List of plugin names |
| | | */ |
| | | public function loaded_plugins() |
| | | { |
| | | return array_keys($this->plugins); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Callback for template_container hooks |
| | | * |
| | | * @param array $attrib |