TYPE-0 PERFECT SEIHA
Server Info:
FreeBSD scimitar.blueboard.cz 13.5-STABLE FreeBSD 13.5-STABLE stable/13-4f2925105 GENERIC amd64
Software:
Apache
User:
www
Crot
Crot File
Crot Dir
Crot Command
[LockSelf]
[HOME]
data
www
19068
fszoo_net
addlogo
home
vendor
nette
application
src
Application
Show Hidden Files
Edit File: /data/www/19068/fszoo_net/addlogo/home/vendor/nette/application/src/Application/Application.php
<?php /** * This file is part of the Nette Framework (http://nette.org) * Copyright (c) 2004 David Grudl (http://davidgrudl.com) */ namespace Nette\Application; use Nette; /** * Front Controller. * * @property-read array $requests * @property-read IPresenter $presenter * @property-read IRouter $router * @property-read IPresenterFactory $presenterFactory */ class Application extends Nette\Object { /** @var int */ public static $maxLoop = 20; /** @var bool enable fault barrier? */ public $catchExceptions; /** @var string */ public $errorPresenter; /** @var callable[] function (Application $sender); Occurs before the application loads presenter */ public $onStartup; /** @var callable[] function (Application $sender, \Exception $e = NULL); Occurs before the application shuts down */ public $onShutdown; /** @var callable[] function (Application $sender, Request $request); Occurs when a new request is received */ public $onRequest; /** @var callable[] function (Application $sender, Presenter $presenter); Occurs when a presenter is created */ public $onPresenter; /** @var callable[] function (Application $sender, IResponse $response); Occurs when a new response is ready for dispatch */ public $onResponse; /** @var callable[] function (Application $sender, \Exception $e); Occurs when an unhandled exception occurs in the application */ public $onError; /** @var Request[] */ private $requests = array(); /** @var IPresenter */ private $presenter; /** @var Nette\Http\IRequest */ private $httpRequest; /** @var Nette\Http\IResponse */ private $httpResponse; /** @var IPresenterFactory */ private $presenterFactory; /** @var IRouter */ private $router; public function __construct(IPresenterFactory $presenterFactory, IRouter $router, Nette\Http\IRequest $httpRequest, Nette\Http\IResponse $httpResponse) { $this->httpRequest = $httpRequest; $this->httpResponse = $httpResponse; $this->presenterFactory = $presenterFactory; $this->router = $router; } /** * Dispatch a HTTP request to a front controller. * @return void */ public function run() { try { $this->onStartup($this); $this->processRequest($this->createInitialRequest()); $this->onShutdown($this); } catch (\Exception $e) { $this->onError($this, $e); if ($this->catchExceptions && $this->errorPresenter) { try { $this->processException($e); $this->onShutdown($this, $e); return; } catch (\Exception $e) { $this->onError($this, $e); } } $this->onShutdown($this, $e); throw $e; } } /** * @return Request */ public function createInitialRequest() { $request = $this->router->match($this->httpRequest); if (!$request instanceof Request) { throw new BadRequestException('No route for HTTP request.'); } elseif (strcasecmp($request->getPresenterName(), $this->errorPresenter) === 0) { throw new BadRequestException('Invalid request. Presenter is not achievable.'); } try { $name = $request->getPresenterName(); $this->presenterFactory->getPresenterClass($name); } catch (InvalidPresenterException $e) { throw new BadRequestException($e->getMessage(), 0, $e); } return $request; } /** * @return void */ public function processRequest(Request $request) { if (count($this->requests) > self::$maxLoop) { throw new ApplicationException('Too many loops detected in application life cycle.'); } $this->requests[] = $request; $this->onRequest($this, $request); $this->presenter = $this->presenterFactory->createPresenter($request->getPresenterName()); $this->onPresenter($this, $this->presenter); $response = $this->presenter->run($request); if ($response instanceof Responses\ForwardResponse) { $this->processRequest($response->getRequest()); } elseif ($response) { $this->onResponse($this, $response); $response->send($this->httpRequest, $this->httpResponse); } } /** * @return void */ public function processException(\Exception $e) { if (!$e instanceof BadRequestException && $this->httpResponse instanceof Nette\Http\Response) { $this->httpResponse->warnOnBuffer = FALSE; } if (!$this->httpResponse->isSent()) { $this->httpResponse->setCode($e instanceof BadRequestException ? ($e->getCode() ?: 404) : 500); } $args = array('exception' => $e, 'request' => end($this->requests) ?: NULL); if ($this->presenter instanceof UI\Presenter) { try { $this->presenter->forward(":$this->errorPresenter:", $args); } catch (AbortException $foo) { $this->processRequest($this->presenter->getLastCreatedRequest()); } } else { $this->processRequest(new Request($this->errorPresenter, Request::FORWARD, $args)); } } /** * Returns all processed requests. * @return Request[] */ public function getRequests() { return $this->requests; } /** * Returns current presenter. * @return IPresenter */ public function getPresenter() { return $this->presenter; } /********************* services ****************d*g**/ /** * Returns router. * @return IRouter */ public function getRouter() { return $this->router; } /** * Returns presenter factory. * @return IPresenterFactory */ public function getPresenterFactory() { return $this->presenterFactory; } }
Crotin
Name
Size
Permissions
Modified
User/Group
exceptions.php
1127
0644
2015-09-30 18:28:51
Unknown/Unknown
IResponse.php
396
0644
2015-09-30 18:28:51
Unknown/Unknown
IRouter.php
613
0644
2015-09-30 18:28:51
Unknown/Unknown
Application.php
5346
0644
2015-09-30 18:28:51
Unknown/Unknown
templates
-
0755
2015-09-30 18:29:15
Unknown/Unknown
IPresenterFactory.php
611
0644
2015-09-30 18:28:51
Unknown/Unknown
MicroPresenter.php-nette-autoupdate-backup.php
4347
0644
2015-09-30 18:28:51
Unknown/Unknown
IPresenter.php
312
0644
2015-09-30 18:28:51
Unknown/Unknown
MicroPresenter.php
4464
0644
2020-10-13 18:26:34
Unknown/Unknown
Request.php
4058
0644
2015-09-30 18:28:51
Unknown/Unknown
ErrorPresenter.php
924
0644
2015-09-30 18:28:51
Unknown/Unknown
Responses
-
0755
2015-09-30 18:29:16
Unknown/Unknown
PresenterFactory.php
3857
0644
2015-09-30 18:28:51
Unknown/Unknown
UI
-
0755
2015-09-30 18:29:15
Unknown/Unknown
Routers
-
0755
2015-09-30 18:29:14
Unknown/Unknown
LinkGenerator.php
2057
0644
2015-09-30 18:28:51
Unknown/Unknown
NGANU
Rename
Hapus
Chmod
Chown
Touch
Zip
Unzip
Download
Crotin