Class Application (namespace Nette\Application)


Front Controller.

Object
   |
   --Application
Author: David Grudl
Copyright: Copyright (c) 2004, 2009 David Grudl
Located: in /Application/Application.php (line 33)
Public Method Summary
static IPresenterLoader
Presenter
Returns current presenter.
IPresenterLoader
Returns presenter loader.
array
Returns all processed requests.
IRouter
Returns router.
object
getService (string $name, [$options = NULL])
Gets the service object of the specified type.
IServiceLocator
Gets the service locator (experimental).
void
restoreRequest (string $key)
Restores current request to session.
void
run ()
Dispatch a HTTP request to a front controller.
Application
setRouter (IRouter $router)
Changes router.
string
storeRequest ([mixed $expiration = '+ 10 minutes'])
Stores current request to session.
Protected Method Summary
protected IHttpRequest
protected IHttpResponse
protected Session
getSession ([$namespace = NULL])
Methods Inherited From Object
extensionMethod(), getClass(), getReflection(), __call(), __callStatic(), __get(), __isset(), __set(), __unset()
Variable Summary
array $allowedMethods array('GET', 'POST', 'HEAD', 'PUT', 'DELETE')

line 63

of string
bool $catchExceptions

line 45

enable fault barrier?
array $defaultServices array( 'Nette\Application\IRouter' => 'Nette\Application\MultiRouter',...

line 39

string $errorPresenter

line 48

static int $maxLoop 20

line 36

array $onError

line 60

of function(Application $sender, \Exception $e); Occurs when an unhandled exception occurs in the application
array $onRequest

line 57

of function(Application $sender, PresenterRequest $request); Occurs when a new request is ready for dispatch
array $onShutdown

line 54

of function(Application $sender, \Exception $e = NULL); Occurs before the application shuts down
array $onStartup

line 51

of function(Application $sender); Occurs before the application loads presenter

Method Details

line 315

createPresenterLoader

public static IPresenterLoader createPresenterLoader ()

Output
IPresenterLoader  

line 370

getHttpRequest

protected IHttpRequest getHttpRequest ()

Output
IHttpRequest  

line 380

getHttpResponse

protected IHttpResponse getHttpResponse ()

Output
IHttpResponse  

line 229

getPresenter

public Presenter getPresenter ()

Returns current presenter.

Output
Presenter  

line 301

getPresenterLoader

public IPresenterLoader getPresenterLoader ()

Returns presenter loader.

Output
IPresenterLoader  

line 218

getRequests

public array getRequests ()

Returns all processed requests.

Output
array of PresenterRequest

line 277

getRouter

public IRouter getRouter ()

Returns router.

Output
IRouter  

line 266

getService

public object getService (string $name, [$options = NULL])

Gets the service object of the specified type.

Input
string $name service name
$options options in case service is not singleton
Output
object  

line 244

getServiceLocator

public IServiceLocator getServiceLocator ()

Gets the service locator (experimental).

Output
IServiceLocator  

line 390

getSession

protected Session getSession ([$namespace = NULL])

Input
$namespace
Output
Session  

line 350

restoreRequest

public void restoreRequest (string $key)

Restores current request to session.

Input
string $key key
Output
void  

line 80

run

public void run ()

Dispatch a HTTP request to a front controller.

Output
void  

line 289

setRouter

public Application setRouter (IRouter $router)

Changes router.

Input
IRouter $router
Output
Application provides a fluent interface

line 331

storeRequest

public string storeRequest ([mixed $expiration = '+ 10 minutes'])

Stores current request to session.

Input
mixed $expiration optional expiration time
Output
string key