/** * called on 'plugins_loaded' event * * @param null $data * @throws \Phile\Exception\ServiceLocatorException */ public function onPluginsLoaded($data = null) { switch ($this->settings['handler']) { case Plugin::HANDLER_ERROR_LOG: ServiceLocator::registerService('Phile_ErrorHandler', new ErrorLog($this->settings)); break; case Plugin::HANDLER_DEVELOPMENT: ServiceLocator::registerService('Phile_ErrorHandler', new Development($this->settings)); break; } }
/** * onPluginsLoaded method */ public function onPluginsLoaded() { // phpFastCache not working in CLI mode... if (PHILE_CLI_MODE) { return; } unset($this->settings['active']); $config = $this->settings + \phpFastCache::$config; $storage = $this->settings['storage']; $cache = phpFastCache($storage, $config); ServiceLocator::registerService('Phile_Cache', new PhpFastCache($cache)); }
/** * onPluginsLoaded method * * @param null $data * * @return mixed|void */ public function onPluginsLoaded($data = null) { ServiceLocator::registerService('Phile_Data_Persistence', new SimpleFileDataPersistence()); }
/** * onPluginsLoaded method * * @param null $data * * @return mixed|void */ public function onPluginsLoaded($data = null) { ServiceLocator::registerService('Phile_Template', new Twig($this->settings)); }
/** * onPluginsLoaded method * * @param null $data * * @return mixed|void */ public function onPluginsLoaded($data = null) { ServiceLocator::registerService('Phile_Parser_Meta', new Meta($this->settings)); }