* @throws InvalidConfigException if invalid normalization action is used. * @throws UrlNormalizerRedirectException if normalization requires redirection. * @throws NotFoundHttpException if normalization suggests action matching route does not exist. */ public function normalizeRoute($route) { if ($this->action === null) { return $route; } elseif ($this->action === static::ACTION_REDIRECT_PERMANENT || $this->action === static::ACTION_REDIRECT_TEMPORARY) { throw new UrlNormalizerRedirectException([$route[0]] + $route[1], $this->action); } elseif ($this->action === static::ACTION_NOT_FOUND) { throw new NotFoundHttpException(Yii::t('yii', 'Page not found.')); } elseif (is_callable($this->action)) { return call_user_func($this->action, $route, $this); } throw new InvalidConfigException('Invalid normalizer action.'); }
return false; } } if ($normalized) { // pathInfo was changed by normalizer - we need also normalize route return $this->normalizer->normalizeRoute([$pathInfo, []]); } return [$pathInfo, []]; } Yii::debug('Pretty URL not enabled. Using default URL parsing logic.', __METHOD__);
* Resolves the current request into a route and the associated parameters. * @return array the first element is the route, and the second is the associated parameters. * @throws NotFoundHttpException if the request cannot be resolved. */ public function resolve() { $result = Yii::$app->getUrlManager()->parseRequest($this); if ($result !== false) { list($route, $params) = $result; if ($this->_queryParams === null) { $_GET = $params + $_GET; // preserve numeric keys } else { $this->_queryParams = $params + $this->_queryParams;
* @return void */ static function beforeRequestHttps():void{ $Request = Yii::$app->getRequest(); if(!$Request->getIsSecureConnection() && (($Request->getServerName() == "home.egmsystems.net") || !in_array($Request->getRemoteIP(), Debug::host["local"])) && ($Request_resolve = $Request->resolve()) && in_array($Request_resolve[0], [ substr(Yii::$app->getUser()->loginUrl[0], 1), "site/signup" ])//*/ ){ $Response = Yii::$app->getResponse();
* Ahora mismo esta página no está disponible. Si el problema continúa, póngase en contacto con el propietario del sitio. * 403 Se denegó el acceso a localhost. No tiene los derechos de usuario para ver esta página. * 404 No se puede encontrar la página: . No se ha encontrado ninguna página web para la dirección web: * @return void */ static function beforeRequest():void{ self::beforeRequestHttps(); self::beforeRequestIpb(); } /** * @return array|null */ static function getIp():array|null{
$event->sender = $this; } $event->handled = false; $event->name = $name; foreach ($eventHandlers as $handler) { $event->data = $handler[1]; call_user_func($handler[0], $event); // stop further handling if the event is handled if ($event->handled) { return; } } }
* @return int the exit status (0 means normal, non-zero values mean abnormal) */ public function run() { 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);
//$config["component"]["session"]["timeout"] = \egm\module\base\models\e\Config::getValueWhereKey("session.timeout");//1440*/ new egm\yii\web\Application($config); unset($config); /* exit(); //*/ Yii::$app->run();//require yet to error managed