// Cate([空]) 無分類頁 public static function Cate(array $pc_row = NULL) { include_once __DIR__.'/ProductCateScopeHandler.php'; return new ProductCateScopeHandler($pc_row); } //~20210422 Kind(NULL) 總覽頁 // Kind([空]) 無分類頁 public static function Kind(array $pk_row = NULL) { include_once __DIR__.'/ProductKindScopeHandler.php'; return new ProductKindScopeHandler($pk_row); } public static function Tag(array $pt_row = NULL) { include_once __DIR__.'/ProductTagScopeHandler.php'; return new ProductTagScopeHandler($pt_row);
if($p_id) parent::checkSeoFilesRedirect301('@web/', $px_row, $p_row, \Amg::SEO_PROD_EXT); //# if($p_sf) parent::checkSeoAbleExit404(); //# $scope == \ProductScope::CATE and $this->scope = ProductScopeHandler::Cate($px_row) and $this->pc_row = $px_row; $scope == \ProductScope::KIND and $this->scope = ProductScopeHandler::Kind($px_row) and $this->pk_row = $px_row; $scope == \ProductScope::TAGS and $this->scope = ProductScopeHandler::Tag($px_row) and $this->pt_row = $px_row; return $this->doProductShow($this->scope, $p_row); } public function actionAttribute($attr, $mix)
$args = $this->controller->bindActionParams($this, $params); Yii::debug('Running action: ' . get_class($this->controller) . '::' . $this->actionMethod . '()', __METHOD__); if (Yii::$app->requestedParams === null) { Yii::$app->requestedParams = $args; } return call_user_func_array([$this->controller, $this->actionMethod], $args); } }
} $result = null; if ($runAction && $this->beforeAction($action)) { // run the action $result = $action->runWithParams($params); $result = $this->afterAction($action, $result); // call afterAction on modules foreach ($modules as $module) { /* @var $module Module */
$parts = $this->createController($route); if (is_array($parts)) { /* @var $controller Controller */ list($controller, $actionID) = $parts; $oldController = Yii::$app->controller; Yii::$app->controller = $controller; $result = $controller->runAction($actionID, $params); if ($oldController !== null) { Yii::$app->controller = $oldController; } return $result; }
$params = $this->catchAll; unset($params[0]); } try { Yii::debug("Route requested: '$route'", __METHOD__); $this->requestedRoute = $route; $result = $this->runAction($route, $params); if ($result instanceof Response) { return $result; } $response = $this->getResponse(); if ($result !== null) {
{ try { $this->state = self::STATE_BEFORE_REQUEST; $this->trigger(self::EVENT_BEFORE_REQUEST); $this->state = self::STATE_HANDLING_REQUEST; $response = $this->handleRequest($this->getRequest()); $this->state = self::STATE_AFTER_REQUEST; $this->trigger(self::EVENT_AFTER_REQUEST); $this->state = self::STATE_SENDING_RESPONSE; $response->send();
exit; //# } } //---------------------------------------------------------------------------- (new \amg\AmgApplication($configs,false))->run(); //is-a \yii\web\Application
$_GET = [ 'scope' => 2, 'mix1' => 'Construction', 'mix2' => 'X-Jaw-Locking-Pliers-2', ]; $_SESSION = [ '__flash' => [], 'gongmawen' => [ 'cart_items' => [], 'clow_items' => [], 'cart_info' => null, ], ];