Lines Matching +full:- +full:- +full:name +full:- +full:only

29         $this->loadConfig();
30 $this->populateMasterList();
31 $this->initAutoloaders();
37 * @param $type string, plugin_type name;
41 * false to only return enabled plugins,
45 * - plugin names when $type = ''
46 * - or plugin component names when a $type is given
55 … return $all ? array_keys($this->masterList) : array_keys(array_filter($this->masterList));
58 if (!isset($this->listByType[$type]['enabled'])) {
59 $this->listByType[$type]['enabled'] = $this->getListByType($type, true);
61 if ($all && !isset($this->listByType[$type]['disabled'])) {
62 $this->listByType[$type]['disabled'] = $this->getListByType($type, false);
66 ? array_merge($this->listByType[$type]['enabled'], $this->listByType[$type]['disabled'])
67 : $this->listByType[$type]['enabled'];
74 * @param $name string name of the plugin to load
81 public function load($type, $name, $new = false, $disabled = false) argument
87 [$plugin, /* component */ ] = $this->splitName($name);
90 if (!$disabled && !$this->isEnabled($plugin)) {
94 $class = $type . '_plugin_' . $name;
98 if (!empty($DOKU_PLUGINS[$type][$name])) {
99 if ($new || !$DOKU_PLUGINS[$type][$name]->isSingleton()) {
103 return $DOKU_PLUGINS[$type][$name];
119 -1
123 … 'Plugin name \'%s\' is not a valid plugin name, only the characters a-z and 0-9 are allowed. ' .
126 ), -1);
130 $DOKU_PLUGINS[$type][$name] = new $class();
136 return $DOKU_PLUGINS[$type][$name];
142 * @param string $plugin name of plugin
149 return !$this->isEnabled($plugin);
155 * @param string $plugin name of plugin
160 return !empty($this->masterList[$plugin]);
166 * @param string $plugin name of plugin
171 if (array_key_exists($plugin, $this->pluginCascade['protected'])) return false;
172 $this->masterList[$plugin] = 0;
173 return $this->saveList();
179 * @param string $plugin name of plugin
184 if (array_key_exists($plugin, $this->pluginCascade['protected'])) return false;
185 $this->masterList[$plugin] = 1;
186 return $this->saveList();
196 return $this->pluginCascade;
208 …if (is_file(DOKU_PLUGIN . $plugin)) continue; // skip files, we're only interested in directori…
210 … if (array_key_exists($plugin, $this->masterList) && $this->masterList[$plugin] == 0) {
212 … } elseif (array_key_exists($plugin, $this->masterList) && $this->masterList[$plugin] == 1) {
218 $this->masterList = $all_plugins;
219 if (!file_exists($this->lastLocalConfigFile)) {
220 $this->saveList(true);
247 * false to save only when config changed
255 if (empty($this->masterList)) return false;
258 $local_plugins = $this->rebuildLocal();
259 if ($local_plugins != $this->pluginCascade['local'] || $forceSave) {
260 $file = $this->lastLocalConfigFile;
262 " * Auto-generated through plugin/extension manager\n *\n" .
290 $backup = $this->masterList;
292 $local_default = array_diff_key($backup, $this->pluginCascade['protected']);
295 $diffed_ones = array_diff_key($local_default, $this->pluginCascade['default']);
301 … return array_merge($sure_plugins, array_diff_assoc($conflicts, $this->pluginCascade['default']));
313 … $this->pluginCascade[$type] = $this->checkRequire($config_cascade['plugins'][$type]);
317 $this->lastLocalConfigFile = array_pop($local);
318 $this->pluginCascade['local'] = $this->checkRequire([$this->lastLocalConfigFile]);
319 $this->pluginCascade['default'] = array_merge(
320 $this->pluginCascade['default'],
321 $this->checkRequire($local)
323 $this->masterList = array_merge(
324 $this->pluginCascade['default'],
325 $this->pluginCascade['local'],
326 $this->pluginCascade['protected']
333 * @param string $type plugin_type name; the type of plugin to return,
341 ? array_keys(array_filter($this->masterList))
342 : array_keys(array_filter($this->masterList, [$this, 'negate']));
359 $plugins[] = $plugin . '_' . substr($component, 0, -4);
371 * Split name in a plugin name and a component name
373 * @param string $name
375 * - plugin name
376 * - and component name when available, otherwise empty string
378 protected function splitName($name) argument
380 if (!isset($this->masterList[$name])) {
381 return sexplode('_', $name, 2, '');
384 return [$name, ''];
403 $plugins = $this->getList();