Changeset View
Changeset View
Standalone View
Standalone View
core/kernel/managers/rewrite_url_processor.php
Show First 20 Lines • Show All 84 Lines • ▼ Show 20 Line(s) | |||||
* | * | ||||
* @param $manager | * @param $manager | ||||
* @return kRewriteUrlProcessor | * @return kRewriteUrlProcessor | ||||
*/ | */ | ||||
public function __construct(&$manager) | public function __construct(&$manager) | ||||
{ | { | ||||
parent::__construct($manager); | parent::__construct($manager); | ||||
$this->HTTPQuery = $this->Application->recallObject('HTTPQuery'); | $this->HTTPQuery = $this->Application->recallObject('kHTTPQuery'); | ||||
// domain based primary language | // domain based primary language | ||||
$this->primaryLanguageId = $this->Application->siteDomainField('PrimaryLanguageId'); | $this->primaryLanguageId = $this->Application->siteDomainField('PrimaryLanguageId'); | ||||
if (!$this->primaryLanguageId) { | if (!$this->primaryLanguageId) { | ||||
// when domain-based language not found -> use site-wide language | // when domain-based language not found -> use site-wide language | ||||
$this->primaryLanguageId = $this->Application->GetDefaultLanguageId(); | $this->primaryLanguageId = $this->Application->GetDefaultLanguageId(); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 373 Lines • ▼ Show 20 Line(s) | |||||
* @return void | * @return void | ||||
* @access protected | * @access protected | ||||
*/ | */ | ||||
protected function _initAll() | protected function _initAll() | ||||
{ | { | ||||
$this->Application->VerifyThemeId(); | $this->Application->VerifyThemeId(); | ||||
$this->Application->VerifyLanguageId(); | $this->Application->VerifyLanguageId(); | ||||
// no need, since we don't have any cached phrase IDs + nobody will use PhrasesCache::LanguageId soon | // No need, since we don't have any cached phrase IDs + nobody will use kPhraseCache::LanguageId soon. | ||||
// $this->Application->Phrases->Init('phrases'); | // $this->Application->Phrases->Init('phrases'); | ||||
} | } | ||||
/** | /** | ||||
* Sets default parsed values before actual url parsing (only, for empty url) | * Sets default parsed values before actual url parsing (only, for empty url) | ||||
* | * | ||||
* @param Array $vars | * @param Array $vars | ||||
* @access protected | * @access protected | ||||
▲ Show 20 Lines • Show All 580 Lines • ▼ Show 20 Line(s) | |||||
$url_parts = Array (); | $url_parts = Array (); | ||||
$listener = $this->rewriteListeners[$prefix][0]; | $listener = $this->rewriteListeners[$prefix][0]; | ||||
$ret = $listener[0]->$listener[1](REWRITE_MODE_BUILD, $prefix_special, $params, $url_parts, $pass_events); | $ret = $listener[0]->$listener[1](REWRITE_MODE_BUILD, $prefix_special, $params, $url_parts, $pass_events); | ||||
return $ret; | return $ret; | ||||
} | } | ||||
} | } | ||||
No newline at end of file |