Source for file Application.php
Documentation is available at Application.php
- 1: <?php
- 3: /**
- 4: * Nette Framework
- 5: *
- 6: * Copyright (c) 2004, 2009 David Grudl (http://davidgrudl.com)
- 7: *
- 8: * This source file is subject to the "Nette license" that is bundled
- 9: * with this package in the file license.txt.
- 10: *
- 11: * For more information please see http://nettephp.com
- 12: *
- 18: */
- 28: /**
- 29: * Front Controller.
- 30: *
- 34: */
- 36: {
- 52: /** @var array of function(Application $sender); Occurs before the application loads presenter */
- 55: /** @var array of function(Application $sender, \Exception $e = NULL); Occurs before the application shuts down */
- 58: /** @var array of function(Application $sender, PresenterRequest $request); Occurs when a new request is ready for dispatch */
- 61: /** @var array of function(Application $sender, \Exception $e); Occurs when an unhandled exception occurs in the application */
- 78: /**
- 79: * Dispatch a HTTP request to a front controller.
- 80: */
- 82: {
- 91: }
- 93: // check HTTP method
- 101: }
- 102: }
- 104: // dispatching
- 111: }
- 116: // default router
- 123: }
- 125: // routing
- 130: }
- 134: }
- 135: }
- 140: // Instantiate presenter
- 147: }
- 151: // Instantiate topmost service locator
- 154: // Execute presenter
- 159: // not error, presenter redirects to new URL
- 164: // not error, presenter forwards to new request
- 168: // not error, application is correctly terminated
- 173: // fault barrier
- 176: }
- 180: }
- 195: }
- 200: }
- 201: echo "<title>404 Not Found</title>\n\n<h1>Not Found</h1>\n\n<p>The requested URL was not found on this server.</p>";
- 206: }
- 209: "<p>The server encountered an internal error and was unable to complete your request. Please try again later.</p>";
- 210: }
- 213: }
- 217: }
- 221: /**
- 222: * Returns all processed requests.
- 224: */
- 226: {
- 228: }
- 232: /**
- 233: * Returns current presenter.
- 235: */
- 237: {
- 239: }
- 243: /********************* services ****************d*g**/
- 247: /**
- 248: * Gets the service locator (experimental).
- 250: */
- 252: {
- 259: }
- 260: }
- 261: }
- 263: }
- 267: /**
- 268: * Gets the service object of the specified type.
- 272: */
- 274: {
- 276: }
- 280: /**
- 281: * Returns router.
- 283: */
- 285: {
- 287: }
- 291: /**
- 292: * Changes router.
- 295: */
- 297: {
- 299: }
- 303: /**
- 304: * Returns presenter loader.
- 306: */
- 308: {
- 310: }
- 314: /********************* request serialization ****************d*g**/
- 318: /**
- 319: * Stores current request to session.
- 322: */
- 324: {
- 333: }
- 337: /**
- 338: * Restores current request to session.
- 341: */
- 343: {
- 350: }
- 351: }
- 355: /********************* backend ****************d*g**/
- 359: /**
- 361: */
- 363: {
- 365: }
- 369: /**
- 371: */
- 373: {
- 375: }
- 379: /**
- 381: */
- 383: {
- 385: }
- 387: }