Lines Matching defs:type
21 protected $type;
36 * @param string $type
44 public function __construct($type, $base, $desc, $author, $email, $name = '', $url = '')
46 $this->type = $type;
51 $this->name = $name ?: ucfirst($base . ' ' . $type);
53 if ($type == self::TYPE_PLUGIN) {
71 $type = self::TYPE_PLUGIN;
73 $type = self::TYPE_TEMPLATE;
78 $data = file($dir . '/' . $type . '.info.txt', FILE_IGNORE_NEW_LINES);
84 return new self($type, $data['base'], $data['desc'], $data['author'], $data['email'], $data['url']);
104 $this->loadSkeleton('info.txt', $this->type . '.info.txt');
113 * @param string $type
116 public function addComponent($type, $component = '', $options = [])
118 if ($this->type !== self::TYPE_PLUGIN) {
122 if (!in_array($type, self::PLUGIN_TYPES)) {
123 throw new RuntimeException('Invalid type ' . $type);
129 $path = $type . '/' . $component . '.php';
130 $class = $type . '_plugin_' . $plugin . '_' . $component;
133 $path = $type . '.php';
134 $class = $type . '_plugin_' . $plugin;
138 if ($type === 'action') {
141 if ($type === 'renderer' && isset($options[0]) && $options[0] === 'Doku_Renderer_xhtml') {
142 $type = 'renderer_xhtml'; // different template then
147 $this->loadSkeleton($type . '.php', $path, $replacements);
224 '@@PLUGIN_TYPE@@' => $this->type,
225 '@@INSTALL_DIR@@' => ($this->type == self::TYPE_PLUGIN) ? 'plugins' : 'tpl',