/var/www/textile_club/http/protected/components/Syncdata.php(17)
05 * Date: 14.11.2014 06 * Time: 14:45 07 */ 08 09 trait Syncdata { 10 11 public $syncNew; 12 13 14 public $database = 'db'; 15 16 public function getDbConnection() { 17 return Yii::app()->{$this->database}; 18 } 19 20 public function syncInsert($db, $data) { 21 $params = []; 22 $list = $this->getTableSchema()->getColumnNames(); 23 24 foreach ($list as $key) { 25 if(in_array($key, $data)) 26 continue; 27 $params[$key]=$this->$key; 28 } 29
#0 |
+
–
/var/www/textile_club/http/protected/vendor/yiisoft/yii/framework/db/CDbConnection.php(347): CDbConnection->open() 342 public function setActive($value) 343 { 344 if($value!=$this->_active) 345 { 346 if($value) 347 $this->open(); 348 else 349 $this->close(); 350 } 351 } 352 |
#1 |
+
–
/var/www/textile_club/http/protected/vendor/yiisoft/yii/framework/db/CDbConnection.php(325): CDbConnection->setActive(true) 320 */ 321 public function init() 322 { 323 parent::init(); 324 if($this->autoConnect) 325 $this->setActive(true); 326 } 327 328 /** 329 * Returns whether the DB connection is established. 330 * @return boolean whether the DB connection is established |
#2 |
+
–
/var/www/textile_club/http/protected/vendor/yiisoft/yii/framework/base/CModule.php(394): CDbConnection->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 |
#3 |
+
–
/var/www/textile_club/http/protected/vendor/yiisoft/yii/framework/base/CModule.php(103): CModule->getComponent("db") 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 /** |
#4 |
+
–
/var/www/textile_club/http/protected/components/Syncdata.php(17): CModule->__get("db") 12 13 14 public $database = 'db'; 15 16 public function getDbConnection() { 17 return Yii::app()->{$this->database}; 18 } 19 20 public function syncInsert($db, $data) { 21 $params = []; 22 $list = $this->getTableSchema()->getColumnNames(); |
#5 |
+
–
/var/www/textile_club/http/protected/vendor/yiisoft/yii/framework/db/ar/CActiveRecord.php(1436): ActiveRecord->getDbConnection() 1431 { 1432 if($checkScopes && ($criteria=$this->getDbCriteria(false))!==null && $criteria->alias!='') 1433 $alias=$criteria->alias; 1434 else 1435 $alias=$this->_alias; 1436 return $quote ? $this->getDbConnection()->getSchema()->quoteTableName($alias) : $alias; 1437 } 1438 1439 /** 1440 * Sets the table alias to be used in queries. 1441 * @param string $alias the table alias to be used in queries. The alias should NOT be quoted. |
#6 |
+
–
/var/www/textile_club/http/protected/vendor/yiisoft/yii/framework/db/ar/CActiveRecord.php(1525): CActiveRecord->getTableAlias(true) 1520 * @return static|null the record found. Null if none is found. 1521 */ 1522 public function findByAttributes($attributes,$condition='',$params=array()) 1523 { 1524 Yii::trace(get_class($this).'.findByAttributes()','system.db.ar.CActiveRecord'); 1525 $prefix=$this->getTableAlias(true).'.'; 1526 $criteria=$this->getCommandBuilder()->createColumnCriteria($this->getTableSchema(),$attributes,$condition,$params,$prefix); 1527 return $this->query($criteria); 1528 } 1529 1530 /** |
#7 |
+
–
/var/www/textile_club/http/protected/models/Items.php(141): CActiveRecord->findByAttributes(array("code" => "tolstovka_9096_21663", "active" => 1)) 136 return parent::model($className); 137 } 138 139 public static function getItemCard($code) 140 { 141 $item = self::model()->findByAttributes(['code' => $code, 'active' => 1]); 142 if ($item === null) { 143 return false; 144 } 145 146 $result = []; |
#8 |
+
–
/var/www/textile_club/http/protected/controllers/SiteController.php(639): Items::getItemCard("tolstovka_9096_21663") 634 635 if ($framed) { 636 $this->layout = 'card'; 637 } 638 639 if (!$data = Items::getItemCard($id)) { 640 throw new CHttpException(404, Yii::t('item', 'not_found')); 641 } 642 643 $this->jsParams = $data; 644 |
#9 |
unknown(0): SiteController->actionItem("tolstovka_9096_21663", false)
|
#10 |
+
–
/var/www/textile_club/http/protected/vendor/yiisoft/yii/framework/web/actions/CAction.php(109): ReflectionMethod->invokeArgs(SiteController, array("tolstovka_9096_21663", false)) 104 elseif($param->isDefaultValueAvailable()) 105 $ps[]=$param->getDefaultValue(); 106 else 107 return false; 108 } 109 $method->invokeArgs($object,$ps); 110 return true; 111 } 112 } |
#11 |
+
–
/var/www/textile_club/http/protected/vendor/yiisoft/yii/framework/web/actions/CInlineAction.php(47): CAction->runWithParamsInternal(SiteController, ReflectionMethod, array("cat" => "trikotajnie_izdelia", "id" => "tolstovka_9096_21663")) 42 { 43 $methodName='action'.$this->getId(); 44 $controller=$this->getController(); 45 $method=new ReflectionMethod($controller, $methodName); 46 if($method->getNumberOfParameters()>0) 47 return $this->runWithParamsInternal($controller, $method, $params); 48 49 $controller->$methodName(); 50 return true; 51 } 52 } |
#12 |
+
–
/var/www/textile_club/http/protected/vendor/yiisoft/yii/framework/web/CController.php(308): CInlineAction->runWithParams(array("cat" => "trikotajnie_izdelia", "id" => "tolstovka_9096_21663")) 303 { 304 $priorAction=$this->_action; 305 $this->_action=$action; 306 if($this->beforeAction($action)) 307 { 308 if($action->runWithParams($this->getActionParams())===false) 309 $this->invalidActionParams($action); 310 else 311 $this->afterAction($action); 312 } 313 $this->_action=$priorAction; |
#13 |
+
–
/var/www/textile_club/http/protected/vendor/yiisoft/yii/framework/web/CController.php(286): CController->runAction(CInlineAction) 281 * @see runAction 282 */ 283 public function runActionWithFilters($action,$filters) 284 { 285 if(empty($filters)) 286 $this->runAction($action); 287 else 288 { 289 $priorAction=$this->_action; 290 $this->_action=$action; 291 CFilterChain::create($this,$action,$filters)->run(); |
#14 |
+
–
/var/www/textile_club/http/protected/vendor/yiisoft/yii/framework/web/CController.php(265): CController->runActionWithFilters(CInlineAction, array()) 260 { 261 if(($parent=$this->getModule())===null) 262 $parent=Yii::app(); 263 if($parent->beforeControllerAction($this,$action)) 264 { 265 $this->runActionWithFilters($action,$this->filters()); 266 $parent->afterControllerAction($this,$action); 267 } 268 } 269 else 270 $this->missingAction($actionID); |
#15 |
+
–
/var/www/textile_club/http/protected/vendor/yiisoft/yii/framework/web/CWebApplication.php(282): CController->run("item") 277 { 278 list($controller,$actionID)=$ca; 279 $oldController=$this->_controller; 280 $this->_controller=$controller; 281 $controller->init(); 282 $controller->run($actionID); 283 $this->_controller=$oldController; 284 } 285 else 286 throw new CHttpException(404,Yii::t('yii','Unable to resolve the request "{route}".', 287 array('{route}'=>$route===''?$this->defaultController:$route))); |
#16 |
+
–
/var/www/textile_club/http/protected/vendor/yiisoft/yii/framework/web/CWebApplication.php(141): CWebApplication->runController("site/item") 136 foreach(array_splice($this->catchAllRequest,1) as $name=>$value) 137 $_GET[$name]=$value; 138 } 139 else 140 $route=$this->getUrlManager()->parseUrl($this->getRequest()); 141 $this->runController($route); 142 } 143 144 /** 145 * Registers the core application components. 146 * This method overrides the parent implementation by registering additional core components. |
#17 |
+
–
/var/www/textile_club/http/protected/vendor/yiisoft/yii/framework/base/CApplication.php(185): CWebApplication->processRequest() 180 public function run() 181 { 182 if($this->hasEventHandler('onBeginRequest')) 183 $this->onBeginRequest(new CEvent($this)); 184 register_shutdown_function(array($this,'end'),0,false); 185 $this->processRequest(); 186 if($this->hasEventHandler('onEndRequest')) 187 $this->onEndRequest(new CEvent($this)); 188 } 189 190 /** |
#18 |
+
–
/var/www/textile_club/http/index.php(217): CApplication->run() 212 213 if($_GET['test'] ?? false) { 214 echo '<pre>'; 215 var_dump($yii1Config); die; 216 } 217 Yii::createWebApplication($yii1Config)->run(); |