public function register($name, $project) { if (empty($name)) { $name = md5($project->getConfigXml()->asXml()); $this->log->info("Automatic project name {$name} given."); $project->setName($name); } parent::register($name, $project); }
/** * @param string $name * * @return object * * @throws Xinc\Core\Registry\Exception */ public function unregister($name) { $widget = parent::unregister($name); $paths = $widget->getPaths(); if (!is_array($paths)) { $this->log->warn(get_class($widget) . '::getPaths has invalid return value.'); $paths = array(); } foreach ($paths as $path) { unset($this->paths[$path]); } return $widget; }
/** * * @param string $name * @param object $task * @throws Xinc\Core\Registry\Exception */ public function register($name, $task) { parent::register($name, $task); $this->slot[$task->getPluginSlot()][$name] = $task; }