type()][] = $hook; } public function trigger($type, $params = array()) { $ret = true; if(isset(self::$_hooks[$type])) { foreach(self::$_hooks[$type] as $name => $hook) { /** @var $hook Hook */ if (!$hook->execute($params)) { $ret = false; } } } return $ret; } public function exist($type) { return isset(self::$_hooks[$type]); } public function load() { foreach(Plugins::getHooks() as $hook) { $this->register($hook['name'], $hook['type'], $hook['file']); } Plugins::clearWarnings(); } }