[ Index ]

PHP Cross Reference of DokuWiki

title

Body

[close]

/inc/Extension/ -> PluginController.php (summary)

(no description)

File Size: 393 lines (14 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

PluginController:: (16 methods):
  __construct()
  getList()
  load()
  isDisabled()
  isEnabled()
  disable()
  enable()
  getCascade()
  populateMasterList()
  checkRequire()
  saveList()
  rebuildLocal()
  loadConfig()
  getListByType()
  splitName()
  negate()


Class: PluginController  - X-Ref

Class to encapsulate access to dokuwiki plugins

__construct()   X-Ref
Populates the master list of plugins


getList($type = '', $all = false)   X-Ref
Returns a list of available plugins of given type

param: $type  string, plugin_type name;
param: $all   bool;
return: array of
author: Andreas Gohr <andi@splitbrain.org>

load($type, $name, $new = false, $disabled = false)   X-Ref
Loads the given plugin and creates an object of it

param: $type     string type of plugin to load
param: $name     string name of the plugin to load
param: $new      bool   true to return a new instance of the plugin, false to use an already loaded instance
param: $disabled bool   true to load even disabled plugins
return: PluginInterface|null  the plugin object or null on failure
author: Andreas Gohr <andi@splitbrain.org>

isDisabled($plugin)   X-Ref
Whether plugin is disabled

param: string $plugin name of plugin
return: bool  true disabled, false enabled

isEnabled($plugin)   X-Ref
Check whether plugin is disabled

param: string $plugin name of plugin
return: bool  true enabled, false disabled

disable($plugin)   X-Ref
Disable the plugin

param: string $plugin name of plugin
return: bool  true saving succeed, false saving failed

enable($plugin)   X-Ref
Enable the plugin

param: string $plugin name of plugin
return: bool  true saving succeed, false saving failed

getCascade()   X-Ref
Returns cascade of the config files

return: array with arrays of plugin configs

populateMasterList()   X-Ref
Read all installed plugins and their current enabled state


checkRequire($files)   X-Ref
Includes the plugin config $files
and returns the entries of the $plugins array set in these files

param: array $files list of files to include, latter overrides previous
return: array with entries of the $plugins arrays of the included files

saveList($forceSave = false)   X-Ref
Save the current list of plugins

param: bool $forceSave ;
return: bool  true saving succeed, false saving failed

rebuildLocal()   X-Ref
Rebuild the set of local plugins

return: array array of plugins to be saved in end($config_cascade['plugins']['local'])

loadConfig()   X-Ref
Build the list of plugins and cascade


getListByType($type, $enabled)   X-Ref
Returns a list of available plugin components of given type

param: string $type plugin_type name; the type of plugin to return,
param: bool $enabled true to return enabled plugins,
return: array of plugin components of requested type

splitName($name)   X-Ref
Split name in a plugin name and a component name

param: string $name
return: array with

negate($input)   X-Ref
Returns inverse boolean value of the input

param: mixed $input
return: bool inversed boolean value of input