/** * Checks each request for test mode */ public function onApplicationRequest(Application $app, Request $request) { // Forwardy (jako je napr. presmerovani na error presenter neresim) if ($request->method != Request::FORWARD) { // Pokud nejsem v testovacim modu vyhodim vyjimku, ze je web v rekonstrukci if (!$this->isTestUrl($this->httpRequest->url)) { if ($this->enabled) { throw new vBuilder\Application\UnderConstructionException(); } } elseif (!$this->enabled) { if ($newUrl = $this->translateUrl($this->httpRequest->url)) { $this->httpResponse->redirect((string) $newUrl); exit; } } } }