Packages

  • Nette
    • Application
      • Diagnostics
      • Responses
      • Routers
      • UI
    • Caching
      • Storages
    • ComponentModel
    • Config
      • Adapters
      • Extensions
    • Database
      • Diagnostics
      • Drivers
      • Reflection
      • Table
    • DI
      • Diagnostics
    • Diagnostics
    • Forms
      • Controls
      • Rendering
    • Http
    • Iterators
    • Latte
      • Macros
    • Loaders
    • Localization
    • Mail
    • Reflection
    • Security
      • Diagnostics
    • Templating
    • Utils
      • PhpGenerator
  • NetteModule
  • None
  • PHP

Classes

  • Application
  • PresenterFactory
  • PresenterRequest

Interfaces

  • IPresenter
  • IPresenterFactory
  • IPresenterResponse
  • IRouter

Exceptions

  • AbortException
  • ApplicationException
  • BadRequestException
  • ForbiddenRequestException
  • InvalidPresenterException
  • Overview
  • Package
  • Class
  • Tree
 1: <?php
 2: 
 3: /**
 4:  * This file is part of the Nette Framework (http://nette.org)
 5:  *
 6:  * Copyright (c) 2004 David Grudl (http://davidgrudl.com)
 7:  *
 8:  * For the full copyright and license information, please view
 9:  * the file license.txt that was distributed with this source code.
10:  * @package Nette\Application
11:  */
12: 
13: 
14: 
15: /**
16:  * The exception that is thrown when user attempts to terminate the current presenter or application.
17:  * This is special "silent exception" with no error message or code.
18:  * @package Nette\Application
19:  */
20: class AbortException extends Exception
21: {
22: }
23: 
24: 
25: 
26: /**
27:  * Application fatal error.
28:  * @package Nette\Application
29:  */
30: class ApplicationException extends Exception
31: {
32:     public function __construct($message = '', $code = 0, Exception $previous = NULL)
33:     {
34:         if (PHP_VERSION_ID < 50300) {
35:             $this->previous = $previous;
36:             parent::__construct($message, $code);
37:         } else {
38:             parent::__construct($message, $code, $previous);
39:         }
40:     }
41: }
42: 
43: 
44: 
45: /**
46:  * The exception that is thrown when a presenter cannot be loaded.
47:  * @package Nette\Application
48:  */
49: class InvalidPresenterException extends Exception
50: {
51: }
52: 
53: 
54: 
55: /**
56:  * Bad HTTP / presenter request exception.
57:  * @package Nette\Application
58:  */
59: class BadRequestException extends Exception
60: {
61:     /** @var int */
62:     protected $defaultCode = 404;
63: 
64: 
65:     public function __construct($message = '', $code = 0, Exception $previous = NULL)
66:     {
67:         if ($code < 200 || $code > 504) {
68:             $code = $this->defaultCode;
69:         }
70: 
71:         if (PHP_VERSION_ID < 50300) {
72:             $this->previous = $previous;
73:             parent::__construct($message, $code);
74:         } else {
75:             parent::__construct($message, $code, $previous);
76:         }
77:     }
78: 
79: }
80: 
81: 
82: 
83: /**
84:  * Forbidden request exception - access denied.
85:  * @package Nette\Application
86:  */
87: class ForbiddenRequestException extends BadRequestException
88: {
89:     /** @var int */
90:     protected $defaultCode = 403;
91: 
92: }
93: 
Nette Framework 2.0.1 (for PHP 5.2, un-prefixed) API API documentation generated by ApiGen 2.7.0