/** * Class constructor * * @param string $p_uri * The full URI string */ public function __construct($p_uri = null) { parent::__construct($p_uri); try { $this->setURLType(URLTYPE_SHORT_NAMES); // HUGE TODO: rewrite this - remove globals controller usage! if (array_key_exists('controller', $GLOBALS)) { if (is_object($GLOBALS['controller'])) { $this->setURL($GLOBALS['controller']->getRequest()); } else { $this->setURLFromSymfony(Zend_Registry::get('container')->getService('request')); } } else { $this->setURL(new Zend_Controller_Request_Http()); } $this->m_validURI = true; $this->validateCache(false); } catch (Exception $e) { $this->m_validURI = false; $this->m_errorCode = $e->getCode(); if (!is_null($this->m_publication)) { $tplId = CampSystem::GetInvalidURLTemplate($this->m_publication->identifier, null, null, !$this->m_preview); $themePath = $this->getThemePath(); $tplId = substr($tplId, strlen($themePath)); $template = new MetaTemplate($tplId, $themePath); if ($template->defined()) { $this->m_template = $template; } CampTemplate::singleton()->config_dir = APPLICATION_PATH . '/../themes/' . $themePath . '_conf'; } CampTemplate::singleton()->trigger_error($e->getMessage()); } }
/** * Class constructor * * @param string $p_uri * The requested URI */ public function __construct($p_uri = null) { parent::__construct($p_uri); $this->setURLType(URLTYPE_TEMPLATE_PATH); $subdir = $this->m_config->getSetting('SUBDIR'); $this->m_templatesPrefix = empty($subdir) ? 'tpl' : substr($subdir, 1) . '/tpl'; $res = $this->setURL(); if (PEAR::isError($res)) { $this->m_validURI = false; $this->m_errorCode = $res->getCode(); if ($this->m_errorCode == self::INVALID_TEMPLATE && !is_null($this->m_publication)) { $tplId = CampSystem::GetInvalidURLTemplate($this->m_publication->identifier, null, null, !$this->m_preview); $template = new MetaTemplate($tplId); if ($template->defined()) { $this->m_template = $template; } } CampTemplate::singleton()->trigger_error($res->getMessage()); } else { foreach (CampURITemplatePath::$m_restrictedParameters as $parameter) { $this->setQueryVar($parameter); } $this->m_validURI = true; } $this->validateCache(false); }
/** * Class constructor * * @param string $p_uri * The full URI string */ public function __construct($p_uri = null) { parent::__construct($p_uri); $this->setURLType(URLTYPE_SHORT_NAMES); $res = $this->setURL(); if (PEAR::isError($res)) { $this->m_validURI = false; $this->m_errorCode = $res->getCode(); if (!is_null($this->m_publication)) { $tplId = CampSystem::GetInvalidURLTemplate($this->m_publication->identifier); $template = new MetaTemplate($tplId); if ($template->defined()) { $this->m_template = $template; } } CampTemplate::singleton()->trigger_error($res->getMessage()); } else { $this->m_validURI = true; } $this->validateCache(false); } // fn __construct
/** * Class constructor * * @param string $p_uri * The full URI string */ public function __construct($p_uri = null) { parent::__construct($p_uri); try { $this->setURLType(URLTYPE_SHORT_NAMES); $this->setURL($GLOBALS['controller']->getRequest()); $this->m_validURI = true; $this->validateCache(false); } catch (Exception $e) { $this->m_validURI = false; $this->m_errorCode = $e->getCode(); if (!is_null($this->m_publication)) { $tplId = CampSystem::GetInvalidURLTemplate($this->m_publication->identifier, null, null, !$this->m_preview); $themePath = $this->getThemePath(); $tplId = substr($tplId, strlen($themePath)); $template = new MetaTemplate($tplId, $themePath); if ($template->defined()) { $this->m_template = $template; } } CampTemplate::singleton()->trigger_error($e->getMessage()); } }