$actionSegments === ['app', 'migrate'] || $actionSegments === ['pluginstore', 'install', 'migrate'] ) { return $this->runAction(implode('/', $actionSegments)); } } // If an exception gets throw during the rendering of the 503 template, let // TemplatesController->actionRenderError() take care of it. throw new ServiceUnavailableHttpException(); } /** * @inheritdoc */ public function end($status = 0, $response = null) { // If we're already sending a template response, just throw an exception if (
Craft::$app->getErrorHandler()->logException($e); } } // Check if a plugin needs to update the database. if ($this->getUpdates()->getIsPluginUpdatePending()) { return $this->_processUpdateLogic($request) ?: $this->getResponse(); } if ($request->getIsCpRequest() && !$request->getIsActionRequest()) { $userSession = $this->getUser(); // If this is a plugin template request, make sure the user has access to the plugin
{ 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();
Dotenv\Dotenv::create(CRAFT_BASE_PATH, null, $factory)->load(); } // Load and run Craft define('CRAFT_ENVIRONMENT', getenv('ENVIRONMENT') ?: 'production'); $app = require CRAFT_VENDOR_PATH.'/craftcms/cms/bootstrap/web.php'; $app->run();