/** @var Category $category */ $category = Category::find()->where(['slug'=>'how-it-works-sachets-capsules'])->one(); $vitality_tabs = array(); $products = array(); $how_it_works_meta = HowItWorks::findOne(['id' => 1]); $child_categories = array(); if (!$category) { throw new NotFoundHttpException(); } if ($category->purpose == 2) { if ($category->parent_id == 0) { $products = array(); $child_categories = Category::find()->where(['parent_id' => $category->id])->orderBy('pos')->all(); if ( ! empty($child_categories)) {
$args = $this->controller->bindActionParams($this, $params); Yii::trace('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); Yii::$app->controller = $oldController; return $result; } else { $id = $this->getUniqueId(); throw new InvalidRouteException('Unable to resolve the request "' . ($id === '' ? $route : $id . '/' . $route) . '".');
$route = $this->catchAll[0]; $params = array_splice($this->catchAll, 1); } try { Yii::trace("Route requested: '$route'", __METHOD__); $this->requestedRoute = $route; $result = $this->runAction($route, $params); if ($result instanceof Response) { return $result; } else { $response = $this->getResponse(); if ($result !== null) { $response->data = $result;
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();
require(__DIR__ . '/../vendor/autoload.php'); require(__DIR__ . '/../vendor/yiisoft/yii2/Yii.php'); $config = require(__DIR__ . '/../config/config.php'); (new yii\web\Application($config))->run();
$_SERVER = [ 'PHPRC' => '/home/slimmain/fcgi-bin/../etc/php5', 'SCRIPT_FILENAME' => '/home/slimmain/public_html/public/index.php', 'PATH' => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin', 'PWD' => '/home/slimmain/fcgi-bin', 'SHLVL' => '0', 'PHP_FCGI_MAX_REQUESTS' => '99999', 'SCRIPT_NAME' => '/index.php', 'REQUEST_URI' => '/how-it-works-sachets-capsules', 'QUERY_STRING' => '', 'REQUEST_METHOD' => 'GET', 'SERVER_PROTOCOL' => 'HTTP/1.1', 'GATEWAY_INTERFACE' => 'CGI/1.1', 'REDIRECT_URL' => '/how-it-works-sachets-capsules', 'REMOTE_PORT' => '27674', 'SERVER_ADMIN' => 'root@localhost', 'CONTEXT_DOCUMENT_ROOT' => '/home/slimmain/public_html/public', 'CONTEXT_PREFIX' => '', 'REQUEST_SCHEME' => 'https', 'DOCUMENT_ROOT' => '/home/slimmain/public_html/public', 'REMOTE_ADDR' => '172.70.86.54', 'SERVER_PORT' => '443', 'SERVER_ADDR' => '176.58.121.254', 'SERVER_NAME' => 'www.slimfast.co.uk', 'SERVER_SOFTWARE' => 'Apache', 'SERVER_SIGNATURE' => '', 'HTTP_CF_IPCOUNTRY' => 'US', 'HTTP_CDN_LOOP' => 'cloudflare', 'HTTP_CF_CONNECTING_IP' => '54.157.61.194', 'HTTP_USER_AGENT' => 'claudebot', 'HTTP_ACCEPT' => '*/*', 'HTTP_CF_VISITOR' => '{"scheme":"https"}', 'HTTP_X_FORWARDED_PROTO' => 'https', 'HTTP_CF_RAY' => '866cc7766830879a-LHR', 'HTTP_X_FORWARDED_FOR' => '54.157.61.194', 'HTTP_ACCEPT_ENCODING' => 'gzip, br', 'HTTP_CONNECTION' => 'close', 'HTTP_HOST' => 'www.slimfast.co.uk', 'SSL_TLS_SNI' => 'www.slimfast.co.uk', 'HTTPS' => 'on', 'SCRIPT_URI' => 'https://www.slimfast.co.uk/how-it-works-sachets-capsules', 'SCRIPT_URL' => '/how-it-works-sachets-capsules', 'UNIQUE_ID' => 'Zflo79rggvqzeybzmUk-1gAAAAo', 'REDIRECT_STATUS' => '200', 'REDIRECT_SSL_TLS_SNI' => 'www.slimfast.co.uk', 'REDIRECT_HTTPS' => 'on', 'REDIRECT_SCRIPT_URI' => 'https://www.slimfast.co.uk/how-it-works-sachets-capsules', 'REDIRECT_SCRIPT_URL' => '/how-it-works-sachets-capsules', 'REDIRECT_UNIQUE_ID' => 'Zflo79rggvqzeybzmUk-1gAAAAo', 'FCGI_ROLE' => 'RESPONDER', 'PHP_SELF' => '/index.php', 'REQUEST_TIME_FLOAT' => 1710844143.1692, 'REQUEST_TIME' => 1710844143, ];