/var/www/4shooters/data/protected/components/SHttpRequest.php(136)
124 * @return string Parsed path info without lang prefix. 125 */ 126 public function getPathInfo() 127 { 128 $langCode = null; 129 130 if(null === $this->_pathInfo) 131 { 132 $pathInfo = parent::getPathInfo(); 133 134 $parts = explode('/', $pathInfo); 135 136 if (in_array($parts[0], Yii::app()->languageManager->getCodes())) 137 { 138 // Valid language code detected. 139 // Remove it from url path to make route work and activate lang 140 $langCode = $parts[0]; 141 142 // If language code is equal default - show 404 page 143 if($langCode === Yii::app()->languageManager->default->code) 144 throw new CHttpException(404, Yii::t('core', 'Page not found')); 145 146 unset($parts[0]); 147 $pathInfo = implode('/', $parts); 148 }
#0 |
+
–
/var/www/4shooters/data/protected/components/SModelEventManager.php(46): SystemModules::loadEventsFile() 41 * @static 42 */ 43 public static function init() 44 { 45 self::$initialized = true; 46 SystemModules::loadEventsFile(); 47 48 foreach(SystemModules::getInstalled() as $module) 49 { 50 $className = ucfirst($module->name).'ModuleEvents'; 51 $eventsModuleAlias = 'application.modules.' . $module->name . '.config.' . $className; |
#1 |
+
–
/var/www/4shooters/data/protected/components/SModelEventManager.php(73): SModelEventManager::init() 68 * @param CActiveRecord $object 69 */ 70 public static function attachEvents(CActiveRecord $object) 71 { 72 if(self::$initialized === false) 73 self::init(); 74 75 if(isset(self::$events[get_class($object)])) 76 { 77 $events = self::$events[get_class($object)]; 78 foreach($events as $e) |
#2 |
+
–
/var/www/4shooters/data/protected/modules/core/models/BaseModel.php(8): SModelEventManager::attachEvents(SSystemLanguage) 03 class BaseModel extends CActiveRecord 04 { 05 public function init() 06 { 07 if(isset(Yii::app()->session)) 08 SModelEventManager::attachEvents($this); 09 } 10 11 public function attributeLabel($attributeName) 12 { 13 return $this->getAttributeLabel($attributeName) . ($this->isAttributeRequired($attributeName) ? ' *' : null); |
#3 |
+
–
/var/www/4shooters/data/framework/db/ar/CActiveRecord.php(1862): BaseModel->init() 1857 { 1858 if($attributes!==false) 1859 { 1860 $record=$this->instantiate($attributes); 1861 $record->setScenario('update'); 1862 $record->init(); 1863 $md=$record->getMetaData(); 1864 foreach($attributes as $name=>$value) 1865 { 1866 if(property_exists($record,$name)) 1867 $record->$name=$value; |
#4 |
+
–
/var/www/4shooters/data/framework/db/ar/CActiveRecord.php(1895): CActiveRecord->populateRecord(array("id" => "1", "name" => "Русский", "code" => "ru", "locale" => "ru", ...), true) 1890 public function populateRecords($data,$callAfterFind=true,$index=null) 1891 { 1892 $records=array(); 1893 foreach($data as $attributes) 1894 { 1895 if(($record=$this->populateRecord($attributes,$callAfterFind))!==null) 1896 { 1897 if($index===null) 1898 $records[]=$record; 1899 else 1900 $records[$record->$index]=$record; |
#5 |
+
–
/var/www/4shooters/data/framework/db/ar/CActiveRecord.php(1359): CActiveRecord->populateRecords(array(array("id" => "1", "name" => "Русский", "code" => "ru", "locale" => "ru", ...), array("id" => "10", "name" => "English", "code" => "en", "locale" => "en_us", ...)), true, null) 1354 if(empty($criteria->with)) 1355 { 1356 if(!$all) 1357 $criteria->limit=1; 1358 $command=$this->getCommandBuilder()->createFindCommand($this->getTableSchema(),$criteria); 1359 return $all ? $this->populateRecords($command->queryAll(), true, $criteria->index) : $this->populateRecord($command->queryRow()); 1360 } 1361 else 1362 { 1363 $finder=$this->getActiveFinder($criteria->with); 1364 return $finder->query($criteria,$all); |
#6 |
+
–
/var/www/4shooters/data/framework/db/ar/CActiveRecord.php(1478): CActiveRecord->query(CDbCriteria, true) 1473 */ 1474 public function findAll($condition='',$params=array()) 1475 { 1476 Yii::trace(get_class($this).'.findAll()','system.db.ar.CActiveRecord'); 1477 $criteria=$this->getCommandBuilder()->createCriteria($condition,$params); 1478 return $this->query($criteria,true); 1479 } 1480 1481 /** 1482 * Finds a single active record with the specified primary key. 1483 * See {@link find()} for detailed explanation about $condition and $params. |
#7 |
+
–
/var/www/4shooters/data/protected/components/SLanguageManager.php(47): CActiveRecord->findAll() 42 * Load available languages. 43 * @return SSystemLanguage collection 44 */ 45 private function loadLanguages() 46 { 47 $model = SSystemLanguage::model()->findAll(); 48 foreach($model as $lang) 49 { 50 $this->_languages[$lang->code] = $lang; 51 if($lang->default === '1') 52 $this->_default = $lang->code; |
#8 |
+
–
/var/www/4shooters/data/protected/components/SLanguageManager.php(35): SLanguageManager->loadLanguages() 30 protected $_best_match; 31 32 public function init() 33 { 34 if (empty($this->_languages)) 35 $this->loadLanguages(); 36 37 //if(Yii::app()->settings->get('core', 'siteId') === 'ishooter') 38 $this->loadAcceptLanguage(); 39 } 40 |
#9 |
+
–
/var/www/4shooters/data/framework/base/CModule.php(394): SLanguageManager->init() 389 if(!isset($config['enabled']) || $config['enabled']) 390 { 391 Yii::trace("Loading \"$id\" application component",'system.CModule'); 392 unset($config['enabled']); 393 $component=Yii::createComponent($config); 394 $component->init(); 395 return $this->_components[$id]=$component; 396 } 397 } 398 } 399 |
#10 |
+
–
/var/www/4shooters/data/framework/base/CModule.php(103): CModule->getComponent("languageManager") 098 * @return mixed the named property value 099 */ 100 public function __get($name) 101 { 102 if($this->hasComponent($name)) 103 return $this->getComponent($name); 104 else 105 return parent::__get($name); 106 } 107 108 /** |
#11 |
+
–
/var/www/4shooters/data/protected/components/SHttpRequest.php(136): CModule->__get("languageManager") 131 { 132 $pathInfo = parent::getPathInfo(); 133 134 $parts = explode('/', $pathInfo); 135 136 if (in_array($parts[0], Yii::app()->languageManager->getCodes())) 137 { 138 // Valid language code detected. 139 // Remove it from url path to make route work and activate lang 140 $langCode = $parts[0]; 141 |
#12 |
+
–
/var/www/4shooters/data/framework/base/CComponent.php(111): SHttpRequest->getPathInfo() 106 */ 107 public function __get($name) 108 { 109 $getter='get'.$name; 110 if(method_exists($this,$getter)) 111 return $this->$getter(); 112 elseif(strncasecmp($name,'on',2)===0 && method_exists($this,$name)) 113 { 114 // duplicating getEventHandlers() here for performance 115 $name=strtolower($name); 116 if(!isset($this->_e[$name])) |
#13 |
+
–
/var/www/4shooters/data/protected/components/SWebApplication.php(32): CComponent->__get("pathInfo") 27 /** 28 * Initialize component 29 */ 30 public function init() 31 { 32 if(strpos(Yii::app()->request->pathInfo, 'filemanager') === 0) 33 { 34 Yii::app()->getComponent("booster"); 35 } 36 37 $this->setSystemModules(); |
#14 |
+
–
/var/www/4shooters/data/framework/base/CApplication.php(170): SWebApplication->init() 165 166 $this->configure($config); 167 $this->attachBehaviors($this->behaviors); 168 $this->preloadComponents(); 169 170 $this->init(); 171 } 172 173 174 /** 175 * Runs the application. |
#15 |
+
–
/var/www/4shooters/data/protected/components/SWebApplication.php(24): CApplication->__construct(array("language" => "en", "sourceLanguage" => "en", "timeZone" => "America/New_York", "preload" => array("log"), ...)) 19 /** 20 * @param null $config 21 */ 22 public function __construct($config=null) 23 { 24 parent::__construct($config); 25 } 26 27 /** 28 * Initialize component 29 */ |
#16 |
+
–
/var/www/4shooters/data/framework/YiiBase.php(132): SWebApplication->__construct("/var/www/4shooters/data/www/4shooters.com/../../protected/config...") 127 * to the constructor of the application class. 128 * @return mixed the application instance 129 */ 130 public static function createApplication($class,$config=null) 131 { 132 return new $class($config); 133 } 134 135 /** 136 * Returns the application singleton or null if the singleton has not been created yet. 137 * @return CApplication the application singleton, null if the singleton has not been created yet. |
#17 |
+
–
/var/www/4shooters/data/www/4shooters.com/index.php(18): YiiBase::createApplication("SWebApplication", "/var/www/4shooters/data/www/4shooters.com/../../protected/config...") 13 14 require $yii; 15 require '../../protected/components/SWebApplication.php'; 16 17 // Create application 18 Yii::createApplication('SWebApplication', $config)->run(); |