4 const EVENT_AFTER_REQUEST = 'afterRequest';
65 /**
66 * Application state used by [[state]]: application just started.
67 * [[state]]适用状态:刚开始应用
68 */
69 const STATE_BEGIN = 0;
70 /**
71 * Application state used by [[state]]: application is initializing.
72 * [[state]]应用程序状态:应用程序初始化。
73 */
74 const STATE_INIT = 1;
75 /**
76 * Application state used by [[state]]: application is triggering [[EVENT_BEFORE_REQUEST]].
77 * [[state]]应用程序状态:应用触发[[EVENT_BEFORE_REQUEST]]
78 */
79 const STATE_BEFORE_REQUEST = 2;
80 /**
81 * Application state used by [[state]]: application is handling the request.
82 * [[state]]应用程序状态:应用程序处理请求。
83 */
84 const STATE_HANDLING_REQUEST = 3;
85 /**
86 * Application state used by [[state]]: application is triggering [[EVENT_AFTER_REQUEST]]..
87 * [[state]]应用程序状态:应用触发[[EVENT_AFTER_REQUEST]]
88 */
89 const STATE_AFTER_REQUEST = 4;
90 /**
91 * Application state used by [[state]]: application is about to send response.
92 * [[state]]应用程序状态:应用程序即将发送响应。
93 */
94 const STATE_SENDING_RESPONSE = 5;
95 /**
96 * Application state used by [[state]]: application has ended.
97 * [[state]]应用程序状态:应用程序结束。
98 */
99 const STATE_END = 6;
100
101 /**
102 * @var string the namespace that controller classes are located in.控制器类的命名空间位置。
103 * This namespace will be used to load controller classes by prepending it to the controller class name.
104 * The default namespace is `app\controllers`.
105 * 此命名空间将用于负载控制器类重写它的控制器类的名字。 默认命名空间是`app\controllers`。
106 * Please refer to the [guide about class autoloading](guide:concept-autoloading.md) for more details.
107 */
108 public $controllerNamespace = 'app\\controllers';
109 /**
110 * @var string the application name.应用程序名称。
111 */
112 public $name = 'My Application';
113 /**
114 * @var string the version of this application.此应用程序的版本。
115 */
116 public $version = '1.0';
117 /**
118 * @var string the charset currently used for the application.目前使用的字符集。
119 */
120 public $charset = 'UTF-8';
121 /**
122 * @var string the language that is meant to be used for end users. It is recommended that you
123 * use [IETF language tags](http://en.wikipedia.org/wiki/IETF_language_tag). For example, `en` stands
124 * for English, while `en-US` stands for English (United States).
125 * 用来作为终端用户使用的语言
126 * @see sourceLanguage
127 */
128 public $language = 'en-US';
129 /**
130 * @var string the language that the application is written in. This mainly refers to
131 * the language that the messages and view files are written in.
132 * 应用程序编写的语言。
133 * @see language
134 */
135 public $sourceLanguage = 'en-US';
136 /**
137 * @var Controller the currently active controller instance当前活动控制器实例
138 */
139 public $controller;
140 /**
141 * @var string|boolean the layout that should be applied for views in this application. Defaults to 'main'.
142 * If this is false, layout will be disabled.
143 * 该应用程序中应用的布局。
144 */
145 public $layout = 'main';
146 /**
147 * @var string the requested route请求的路径 请求的路径
148 */
149 public $requestedRoute;
150 /**
151 * @var Action the requested Action. If null, it means the request cannot be resolved into an action.
152 * 操作所要求的行动
153 */
154 public $requestedAction;
155 /**
156 * @var array the parameters supplied to the requested action.
157 * 所请求的动作提供的参数。
158 */
159 public $requestedParams;
160 /**
161 * @var array list of i |