/**
  * 
  */
 function __construct($name)
 {
     $theme =& x_getModuleManager();
     $this->m_template_file = $theme->invoke('xh_templateMapping', $name);
     if ($this->m_template_file === NULL) {
         xLog::log('Template', LOG_LEVEL_ERROR, 'Template mapping does not exists', __FILE__, __LINE__);
     }
 }
 /**
  * 
  */
 function &getDAO($name)
 {
     if (!isset($this->m_cached[$name])) {
         $mod =& x_getModuleManager();
         $this->m_cached[$name] = $mod->invoke('xh_fetchDAO', array($this->m_db_type, $name));
     }
     return $this->m_cached[$name];
 }
 /**
  * 
  */
 function fetchContent(&$path)
 {
     $mod =& x_getModuleManager();
     $content = $mod->invoke('xh_fetchContent', array(&$this->m_path));
     if ($content === NULL) {
         $content = new xStaticContentController($this->m_path, new xPageNotFoundContentView());
     }
     return $content;
 }
 /**
  * 
  */
 function _doProcess()
 {
     $mod =& x_getModuleManager();
     $ss = $mod->invokeAll('xh_documentStylesheets', array(&$this->m_path));
     $this->m_component_view->m_stylesheets = $ss->getValidValues(true);
     $this->m_component_view->m_language = $this->m_path->m_lang;
     foreach ($this->m_components as $k => $v) {
         $this->m_components[$k]->_process();
         if ($this->m_components[$k]->isReadyToDisplay()) {
             $this->m_component_view->m_components[$k] =& $this->m_components[$k]->m_component_view;
             if (xanth_instanceof($this->m_components[$k], 'xContentController')) {
                 $this->m_component_view->m_title = $this->m_components[$k]->m_component_view->m_title;
                 $this->m_component_view->m_keywords = $this->m_components[$k]->m_component_view->m_keywords;
                 $this->m_component_view->m_description = $this->m_components[$k]->m_component_view->m_description;
             }
         }
     }
     return true;
 }
 /**
  * Crete and process contents for this component
  * 
  * @access private
  * @return void
  */
 function _process()
 {
     if ($this->m_state < X_COMPONENT_PREPROCESSED) {
         return;
     }
     $this->m_state = X_COMPONENT_PROCESSED;
     $res = $this->_doProcess();
     if ($res === null) {
         $this->m_state = X_COMPONENT_BYPASS;
     } elseif ($res === false) {
         $this->m_state = X_COMPONENT_PROCESS_FAILED;
     } else {
         $mod =& x_getModuleManager();
         $mod->invokeAll('xh_processComponentController', array(&$this));
     }
 }