/home/c/cl43698/public_html/protected/components/SeoBuilder.php(34)
22 return self::$instance; 23 } 24 25 public function makeTextFromTemplate($model, $template) 26 { 27 if (!$template) { 28 return null; 29 } 30 $text = preg_replace_callback('~(\{[a-z]+\})~ui', function ($matches) use ($model) { 31 $match = str_replace(['{', '}'], '', $matches[0]); 32 try { 33 if ($match == 'category') { 34 return $model->getCategoryTitle(); 35 } 36 return $model->$match ?? null; 37 } catch (\Exception $ex) { 38 return 'undefined'; 39 } 40 }, $template); 41 return $text; 42 } 43 }
#0 |
unknown(0): SeoBuilder->{closure}(array("{category}", "{category}"))
|
#1 |
+
–
/home/c/cl43698/public_html/protected/components/SeoBuilder.php(40): preg_replace_callback("~(\{[a-z]+\})~ui", Closure, "Купить {title} {category}") 35 } 36 return $model->$match ?? null; 37 } catch (\Exception $ex) { 38 return 'undefined'; 39 } 40 }, $template); 41 return $text; 42 } 43 } |
#2 |
+
–
/home/c/cl43698/public_html/protected/controllers/ShopController.php(113): SeoBuilder->makeTextFromTemplate(null, "Купить {title} {category}") 108 public function actionProduct($id) 109 { 110 $product = Product::model()->visibled()->findByPk($id); 111 $this->prepareSeo($product->meta_title ?: $product->title); 112 if(!$product->meta_title) { 113 $product->meta_title = \SeoBuilder::maker()->makeTextFromTemplate($product, D::cms('shop_product_title')) ?? null; 114 } 115 if(!$product->meta_desc) { 116 $product->meta_desc = \SeoBuilder::maker()->makeTextFromTemplate($product, D::cms('shop_product_desc')) ?? null; 117 } 118 if(!$product->meta_key) { |
#3 |
unknown(0): ShopController->actionProduct("15")
|
#4 |
+
–
/home/c/cl43698/yii/yiilite.php(4147): ReflectionMethod->invokeArgs(ShopController, array("15")) 4142 elseif($param->isDefaultValueAvailable()) 4143 $ps[]=$param->getDefaultValue(); 4144 else 4145 return false; 4146 } 4147 $method->invokeArgs($object,$ps); 4148 return true; 4149 } 4150 } 4151 class CInlineAction extends CAction 4152 { |
#5 |
+
–
/home/c/cl43698/yii/yiilite.php(4164): CAction->runWithParamsInternal(ShopController, ReflectionMethod, array("id" => "15")) 4159 { 4160 $methodName='action'.$this->getId(); 4161 $controller=$this->getController(); 4162 $method=new ReflectionMethod($controller, $methodName); 4163 if($method->getNumberOfParameters()>0) 4164 return $this->runWithParamsInternal($controller, $method, $params); 4165 $controller->$methodName(); 4166 return true; 4167 } 4168 } 4169 class CWebUser extends CApplicationComponent implements IWebUser |
#6 |
+
–
/home/c/cl43698/yii/yiilite.php(3678): CInlineAction->runWithParams(array("id" => "15")) 3673 { 3674 $priorAction=$this->_action; 3675 $this->_action=$action; 3676 if($this->beforeAction($action)) 3677 { 3678 if($action->runWithParams($this->getActionParams())===false) 3679 $this->invalidActionParams($action); 3680 else 3681 $this->afterAction($action); 3682 } 3683 $this->_action=$priorAction; |
#7 |
+
–
/home/c/cl43698/yii/yiilite.php(6922): CController->runAction(CInlineAction) 6917 { 6918 $filter=$this->itemAt($this->filterIndex++); 6919 $filter->filter($this); 6920 } 6921 else 6922 $this->controller->runAction($this->action); 6923 } 6924 } 6925 class CFilter extends CComponent implements IFilter 6926 { 6927 public function filter($filterChain) |
#8 |
+
–
/home/c/cl43698/yii/yiilite.php(6931): CFilterChain->run() 6926 { 6927 public function filter($filterChain) 6928 { 6929 if($this->preFilter($filterChain)) 6930 { 6931 $filterChain->run(); 6932 $this->postFilter($filterChain); 6933 } 6934 } 6935 public function init() 6936 { |
#9 |
+
–
/home/c/cl43698/yii/yiilite.php(6919): CFilter->filter(CFilterChain) 6914 public function run() 6915 { 6916 if($this->offsetExists($this->filterIndex)) 6917 { 6918 $filter=$this->itemAt($this->filterIndex++); 6919 $filter->filter($this); 6920 } 6921 else 6922 $this->controller->runAction($this->action); 6923 } 6924 } |
#10 |
+
–
/home/c/cl43698/yii/yiilite.php(3668): CFilterChain->run() 3663 $this->runAction($action); 3664 else 3665 { 3666 $priorAction=$this->_action; 3667 $this->_action=$action; 3668 CFilterChain::create($this,$action,$filters)->run(); 3669 $this->_action=$priorAction; 3670 } 3671 } 3672 public function runAction($action) 3673 { |
#11 |
+
–
/home/c/cl43698/yii/yiilite.php(3653): CController->runActionWithFilters(CInlineAction, array(array(0 => "DModuleFilter", "name" => "shop"))) 3648 { 3649 if(($parent=$this->getModule())===null) 3650 $parent=Yii::app(); 3651 if($parent->beforeControllerAction($this,$action)) 3652 { 3653 $this->runActionWithFilters($action,$this->filters()); 3654 $parent->afterControllerAction($this,$action); 3655 } 3656 } 3657 else 3658 $this->missingAction($actionID); |
#12 |
+
–
/home/c/cl43698/yii/yiilite.php(1768): CController->run("product") 1763 { 1764 list($controller,$actionID)=$ca; 1765 $oldController=$this->_controller; 1766 $this->_controller=$controller; 1767 $controller->init(); 1768 $controller->run($actionID); 1769 $this->_controller=$oldController; 1770 } 1771 else 1772 throw new CHttpException(404,Yii::t('yii','Unable to resolve the request "{route}".', 1773 array('{route}'=>$route===''?$this->defaultController:$route))); |
#13 |
+
–
/home/c/cl43698/yii/yiilite.php(1688): CWebApplication->runController("shop/product") 1683 foreach(array_splice($this->catchAllRequest,1) as $name=>$value) 1684 $_GET[$name]=$value; 1685 } 1686 else 1687 $route=$this->getUrlManager()->parseUrl($this->getRequest()); 1688 $this->runController($route); 1689 } 1690 protected function registerCoreComponents() 1691 { 1692 parent::registerCoreComponents(); 1693 $components=array( |
#14 |
+
–
/home/c/cl43698/yii/yiilite.php(1205): CWebApplication->processRequest() 1200 public function run() 1201 { 1202 if($this->hasEventHandler('onBeginRequest')) 1203 $this->onBeginRequest(new CEvent($this)); 1204 register_shutdown_function(array($this,'end'),0,false); 1205 $this->processRequest(); 1206 if($this->hasEventHandler('onEndRequest')) 1207 $this->onEndRequest(new CEvent($this)); 1208 } 1209 public function end($status=0,$exit=true) 1210 { |
#15 |
+
–
/home/c/cl43698/public_html/index.php(53): CApplication->run() 48 49 $config = dirname(__FILE__) . '/protected/config/main.php'; 50 51 require_once($yii); 52 53 Yii::createWebApplication($config)->run(); 54 55 ob_end_flush(); |