/** * Setup base properties. * * @return void */ protected function _configureBase() { $this->getPath(); $this->systemBaseDir = realpath('.'); $class = get_class($this); $parts = strpos($class, '_') ? explode('_', $class) : explode('\\', $class); $this->name = $parts[0]; $this->baseDir = $this->plugin->getBaseDir(); $this->pluginName = $this->plugin->getPluginName(); $this->moduleName = $this->plugin->getModuleName(); $this->modinfo = $this->plugin->getModInfo(); if (!$this->plugin->getPluginType() == AbstractPlugin::TYPE_SYSTEM) { $modbase = $this->modinfo['type'] == AbstractPlugin::TYPE_MODULE ? 'modules' : 'system'; $this->baseDir = realpath("{$this->systemBaseDir}/{$modbase}/{$this->moduleName}/plugins/{$this->pluginName}"); } $this->domain = $this->plugin->getDomain(); }
/** * Setup base properties. * * @return void */ protected function _configureBase() { $this->systemBaseDir = realpath('.'); $parts = explode('_', get_class($this)); $this->name = $parts[0]; $this->baseDir = $this->plugin->getBaseDir(); $this->pluginName = $this->plugin->getPluginName(); $this->moduleName = $this->plugin->getModuleName(); $this->modinfo = $this->plugin->getModInfo(); if ($this->plugin->getPluginType() == Zikula_AbstractPlugin::TYPE_SYSTEM) { $this->libBaseDir = realpath("{$this->baseDir}/plugins/{$this->pluginName}/lib/{$this->pluginName}"); } else { $modbase = $this->modinfo['type'] == Zikula_AbstractPlugin::TYPE_MODULE ? 'modules' : 'system'; $this->baseDir = realpath("{$this->systemBaseDir}/{$modbase}/{$this->moduleName}/plugins/{$this->pluginName}"); $this->libBaseDir = realpath("{$this->baseDir}/lib/{$this->pluginName}"); } $this->domain = $this->plugin->getDomain(); }