function initialize(IConfigParameter $configuration) { $this->_templateDir = Project::NS()->path($configuration->get('template_dir')); if (!file_exists($this->_templateDir) || !is_dir($this->_templateDir)) { throw new TemplateException("Template manager: root template directory is not exists"); } $this->_js_path = $configuration->get('js_path'); $this->_css_path = $configuration->get('css_path'); $this->_image_path = $configuration->get('image_path'); $this->_cj_cache_path = $configuration->get('cj_cache_path'); Project::setTemplateManager($this); $this->_common_config($configuration); }