/** * Get the request from Joppa, if none found pass the call to the fallback router * @return zibo\core\Request */ public function getRequest() { $query = $this->getQuery(); if (String::startsWith($query, Zibo::DIRECTORY_WEB . Request::QUERY_SEPARATOR)) { return $this->router->getRequest(); } $request = $this->getRequestFromQuery($query); if ($request) { return $request; } return $this->router->getRequest(); }
/** * Perform the routing: get a Request object from the router and set it to this object * @return null */ private function route() { $this->eventManager->runEvent(self::EVENT_PRE_ROUTE); if ($this->router == null) { $this->router = new GenericRouter(); } $request = $this->router->getRequest(); $this->setRequest($request); $this->eventManager->runEvent(self::EVENT_POST_ROUTE); }