Home > php教程 > php手册 > yii2源码学习笔记(九)

yii2源码学习笔记(九)

WBOY
Release: 2016-06-01 14:32:43
Original
1202 people have browsed it

Application是所有应用程序类的基类,接下来了解一下它的源码。yii2\base\Application.php。

<span style="color: #008080;">  1</span> <span style="color: #000000;">php
</span><span style="color: #008080;">  2</span> <span style="color: #008000;">/*</span><span style="color: #008000;">*
</span><span style="color: #008080;">  3</span> <span style="color: #008000;"> * @link </span><span style="color: #008000; text-decoration: underline;">http://www.yiiframework.com/</span>
<span style="color: #008080;">  4</span> <span style="color: #008000;"> * @copyright Copyright (c) 2008 Yii Software LLC
</span><span style="color: #008080;">  5</span> <span style="color: #008000;"> * @license </span><span style="color: #008000; text-decoration: underline;">http://www.yiiframework.com/license/</span>
<span style="color: #008080;">  6</span>  <span style="color: #008000;">*/</span>
<span style="color: #008080;">  7</span> 
<span style="color: #008080;">  8</span> <span style="color: #0000ff;">namespace</span> yii\<span style="color: #0000ff;">base</span><span style="color: #000000;">;
</span><span style="color: #008080;">  9</span> 
<span style="color: #008080;"> 10</span> <span style="color: #000000;">use Yii;
</span><span style="color: #008080;"> 11</span> 
<span style="color: #008080;"> 12</span> <span style="color: #008000;">/*</span><span style="color: #008000;">*
</span><span style="color: #008080;"> 13</span> <span style="color: #008000;"> * Application is the base class for all application classes.
</span><span style="color: #008080;"> 14</span> <span style="color: #008000;"> * 是所有应用程序类的基类
</span><span style="color: #008080;"> 15</span> <span style="color: #008000;"> * @property \yii\web\AssetManager $assetManager The asset manager application component. This property is
</span><span style="color: #008080;"> 16</span> <span style="color: #008000;"> * read-only.资产管理器应用组件,只读
</span><span style="color: #008080;"> 17</span> <span style="color: #008000;"> * @property \yii\rbac\ManagerInterface $authManager The auth manager application component. Null is returned
</span><span style="color: #008080;"> 18</span> <span style="color: #008000;"> * if auth manager is not configured. This property is read-only.认证管理器应用程序组件。未配置返回null,只读
</span><span style="color: #008080;"> 19</span> <span style="color: #008000;"> * @property string $basePath The root directory of the application. 应用程序的根目录。
</span><span style="color: #008080;"> 20</span> <span style="color: #008000;"> * @property \yii\caching\Cache $cache The cache application component. Null if the component is not enabled.
</span><span style="color: #008080;"> 21</span> <span style="color: #008000;"> * This property is read-only.缓存应用程序组件。
</span><span style="color: #008080;"> 22</span> <span style="color: #008000;"> * @property \yii\db\Connection $db The database connection. This property is read-only.数据库连接。
</span><span style="color: #008080;"> 23</span> <span style="color: #008000;"> * @property \yii\web\ErrorHandler|\yii\console\ErrorHandler $errorHandler The error handler application
</span><span style="color: #008080;"> 24</span> <span style="color: #008000;"> * component. This property is read-only.错误处理程序应用程序组件
</span><span style="color: #008080;"> 25</span> <span style="color: #008000;"> * @property \yii\i18n\Formatter $formatter The formatter application component. This property is read-only.
</span><span style="color: #008080;"> 26</span> <span style="color: #008000;"> * 格式化程序的应用程序组件。
</span><span style="color: #008080;"> 27</span> <span style="color: #008000;"> * @property \yii\i18n\I18N $i18n The internationalization application component. This property is read-only.
</span><span style="color: #008080;"> 28</span> <span style="color: #008000;"> * 国际化应用组件。
</span><span style="color: #008080;"> 29</span> <span style="color: #008000;"> * @property \yii\log\Dispatcher $log The log dispatcher application component. This property is read-only.
</span><span style="color: #008080;"> 30</span> <span style="color: #008000;"> * 日志调度程序组件。
</span><span style="color: #008080;"> 31</span> <span style="color: #008000;"> * @property \yii\mail\MailerInterface $mailer The mailer application component. This property is read-only.
</span><span style="color: #008080;"> 32</span> <span style="color: #008000;"> * 邮件应用程序组件。
</span><span style="color: #008080;"> 33</span> <span style="color: #008000;"> * @property \yii\web\Request|\yii\console\Request $request The request component. This property is read-only.
</span><span style="color: #008080;"> 34</span> <span style="color: #008000;"> * 请求组件。
</span><span style="color: #008080;"> 35</span> <span style="color: #008000;"> * @property \yii\web\Response|\yii\console\Response $response The response component. This property is
</span><span style="color: #008080;"> 36</span> <span style="color: #008000;"> * read-only.反应元件。
</span><span style="color: #008080;"> 37</span> <span style="color: #008000;"> * @property string $runtimePath The directory that stores runtime files. Defaults to the "runtime"
</span><span style="color: #008080;"> 38</span> <span style="color: #008000;"> * subdirectory under [[basePath]].存储运行时文件的目录。
</span><span style="color: #008080;"> 39</span> <span style="color: #008000;"> * @property \yii\base\Security $security The security application component. This property is read-only.
</span><span style="color: #008080;"> 40</span> <span style="color: #008000;"> * 安全应用组件。
</span><span style="color: #008080;"> 41</span> <span style="color: #008000;"> * @property string $timeZone The time zone used by this application.该应用程序使用的时区。
</span><span style="color: #008080;"> 42</span> <span style="color: #008000;"> * @property string $uniqueId The unique ID of the module. This property is read-only.模块的唯一标识。
</span><span style="color: #008080;"> 43</span> <span style="color: #008000;"> * @property \yii\web\UrlManager $urlManager The URL manager for this application. This property is read-only.
</span><span style="color: #008080;"> 44</span> <span style="color: #008000;"> * 此应用程序的网址管理器。
</span><span style="color: #008080;"> 45</span> <span style="color: #008000;"> * @property string $vendorPath The directory that stores vendor files. Defaults to "vendor" directory under
</span><span style="color: #008080;"> 46</span> <span style="color: #008000;"> * [[basePath]].存储供应商文件的目录。
</span><span style="color: #008080;"> 47</span> <span style="color: #008000;"> * @property View|\yii\web\View $view The view application component that is used to render various view
</span><span style="color: #008080;"> 48</span> <span style="color: #008000;"> * files. This property is read-only.用于呈现各种视图文件的视图应用程序组件
</span><span style="color: #008080;"> 49</span> <span style="color: #008000;"> *
</span><span style="color: #008080;"> 50</span> <span style="color: #008000;"> * @author Qiang Xue <qiang.xue>
</qiang.xue></span><span style="color: #008080;"> 51</span> <span style="color: #008000;"> * @since 2.0
</span><span style="color: #008080;"> 52</span>  <span style="color: #008000;">*/</span>
<span style="color: #008080;"> 53</span> <span style="color: #0000ff;">abstract</span> <span style="color: #0000ff;">class</span><span style="color: #000000;"> Application extends Module
</span><span style="color: #008080;"> 54</span> <span style="color: #000000;">{
</span><span style="color: #008080;"> 55</span>     <span style="color: #008000;">/*</span><span style="color: #008000;">*
</span><span style="color: #008080;"> 56</span> <span style="color: #008000;">     * @event Event an event raised before the application starts to handle a request.
</span><span style="color: #008080;"> 57</span> <span style="color: #008000;">     * 在应用程序开始处理请求之前提出的事件。
</span><span style="color: #008080;"> 58</span>      <span style="color: #008000;">*/</span>
<span style="color: #008080;"> 59</span>     <span style="color: #0000ff;">const</span> EVENT_BEFORE_REQUEST = <span style="color: #800000;">'</span><span style="color: #800000;">beforeRequest</span><span style="color: #800000;">'</span><span style="color: #000000;">;
</span><span style="color: #008080;"> 60</span>     <span style="color: #008000;">/*</span><span style="color: #008000;">*
</span><span style="color: #008080;"> 61</span> <span style="color: #008000;">     * @event Event an event raised after the application successfully handles a request (before the response is sent out).
</span><span style="color: #008080;"> 62</span> <span style="color: #008000;">     * 该应用程序成功处理请求后提出的事件
</span><span style="color: #008080;"> 63</span>      <span style="color: #008000;">*/</span>
<span style="color: #008080;"> 64</span>     <span style="color: #0000ff;">const</span> EVENT_AFTER_REQUEST = <span style="color: #800000;">'</span><span style="color: #800000;">afterRequest</span><span style="color: #800000;">'</span><span style="color: #000000;">;
</span><span style="color: #008080;"> 65</span>     <span style="color: #008000;">/*</span><span style="color: #008000;">*
</span><span style="color: #008080;"> 66</span> <span style="color: #008000;">     * Application state used by [[state]]: application just started.
</span><span style="color: #008080;"> 67</span> <span style="color: #008000;">     * [[state]]适用状态:刚开始应用
</span><span style="color: #008080;"> 68</span>      <span style="color: #008000;">*/</span>
<span style="color: #008080;"> 69</span>     <span style="color: #0000ff;">const</span> STATE_BEGIN = <span style="color: #800080;">0</span><span style="color: #000000;">;
</span><span style="color: #008080;"> 70</span>     <span style="color: #008000;">/*</span><span style="color: #008000;">*
</span><span style="color: #008080;"> 71</span> <span style="color: #008000;">     * Application state used by [[state]]: application is initializing.
</span><span style="color: #008080;"> 72</span> <span style="color: #008000;">     *  [[state]]应用程序状态:应用程序初始化。
</span><span style="color: #008080;"> 73</span>      <span style="color: #008000;">*/</span>
<span style="color: #008080;"> 74</span>     <span style="color: #0000ff;">const</span> STATE_INIT = <span style="color: #800080;">1</span><span style="color: #000000;">;
</span><span style="color: #008080;"> 75</span>     <span style="color: #008000;">/*</span><span style="color: #008000;">*
</span><span style="color: #008080;"> 76</span> <span style="color: #008000;">     * Application state used by [[state]]: application is triggering [[EVENT_BEFORE_REQUEST]].
</span><span style="color: #008080;"> 77</span> <span style="color: #008000;">     *  [[state]]应用程序状态:应用触发[[EVENT_BEFORE_REQUEST]]
</span><span style="color: #008080;"> 78</span>      <span style="color: #008000;">*/</span>
<span style="color: #008080;"> 79</span>     <span style="color: #0000ff;">const</span> STATE_BEFORE_REQUEST = <span style="color: #800080;">2</span><span style="color: #000000;">;
</span><span style="color: #008080;"> 80</span>     <span style="color: #008000;">/*</span><span style="color: #008000;">*
</span><span style="color: #008080;"> 81</span> <span style="color: #008000;">     * Application state used by [[state]]: application is handling the request.
</span><span style="color: #008080;"> 82</span> <span style="color: #008000;">     *  [[state]]应用程序状态:应用程序处理请求。
</span><span style="color: #008080;"> 83</span>      <span style="color: #008000;">*/</span>
<span style="color: #008080;"> 84</span>     <span style="color: #0000ff;">const</span> STATE_HANDLING_REQUEST = <span style="color: #800080;">3</span><span style="color: #000000;">;
</span><span style="color: #008080;"> 85</span>     <span style="color: #008000;">/*</span><span style="color: #008000;">*
</span><span style="color: #008080;"> 86</span> <span style="color: #008000;">     * Application state used by [[state]]: application is triggering [[EVENT_AFTER_REQUEST]]..
</span><span style="color: #008080;"> 87</span> <span style="color: #008000;">     *  [[state]]应用程序状态:应用触发[[EVENT_AFTER_REQUEST]]
</span><span style="color: #008080;"> 88</span>      <span style="color: #008000;">*/</span>
<span style="color: #008080;"> 89</span>     <span style="color: #0000ff;">const</span> STATE_AFTER_REQUEST = <span style="color: #800080;">4</span><span style="color: #000000;">;
</span><span style="color: #008080;"> 90</span>     <span style="color: #008000;">/*</span><span style="color: #008000;">*
</span><span style="color: #008080;"> 91</span> <span style="color: #008000;">     * Application state used by [[state]]: application is about to send response.
</span><span style="color: #008080;"> 92</span> <span style="color: #008000;">     *  [[state]]应用程序状态:应用程序即将发送响应。
</span><span style="color: #008080;"> 93</span>      <span style="color: #008000;">*/</span>
<span style="color: #008080;"> 94</span>     <span style="color: #0000ff;">const</span> STATE_SENDING_RESPONSE = <span style="color: #800080;">5</span><span style="color: #000000;">;
</span><span style="color: #008080;"> 95</span>     <span style="color: #008000;">/*</span><span style="color: #008000;">*
</span><span style="color: #008080;"> 96</span> <span style="color: #008000;">     * Application state used by [[state]]: application has ended.
</span><span style="color: #008080;"> 97</span> <span style="color: #008000;">     *  [[state]]应用程序状态:应用程序结束。
</span><span style="color: #008080;"> 98</span>      <span style="color: #008000;">*/</span>
<span style="color: #008080;"> 99</span>     <span style="color: #0000ff;">const</span> STATE_END = <span style="color: #800080;">6</span><span style="color: #000000;">;
</span><span style="color: #008080;">100</span> 
<span style="color: #008080;">101</span>     <span style="color: #008000;">/*</span><span style="color: #008000;">*
</span><span style="color: #008080;">102</span> <span style="color: #008000;">     * @var string the namespace that controller classes are located in.控制器类的命名空间位置。
</span><span style="color: #008080;">103</span> <span style="color: #008000;">     * This namespace will be used to load controller classes by prepending it to the controller class name.
</span><span style="color: #008080;">104</span> <span style="color: #008000;">     * The default namespace is `app\controllers`.
</span><span style="color: #008080;">105</span> <span style="color: #008000;">     * 此命名空间将用于负载控制器类重写它的控制器类的名字。 默认命名空间是`app\controllers`。
</span><span style="color: #008080;">106</span> <span style="color: #008000;">     * Please refer to the [guide about class autoloading](guide:concept-autoloading.md) for more details.
</span><span style="color: #008080;">107</span>      <span style="color: #008000;">*/</span>
<span style="color: #008080;">108</span>     <span style="color: #0000ff;">public</span> $controllerNamespace = <span style="color: #800000;">'</span><span style="color: #800000;">app\\controllers</span><span style="color: #800000;">'</span><span style="color: #000000;">;
</span><span style="color: #008080;">109</span>     <span style="color: #008000;">/*</span><span style="color: #008000;">*
</span><span style="color: #008080;">110</span> <span style="color: #008000;">     * @var string the application name.应用程序名称。
</span><span style="color: #008080;">111</span>      <span style="color: #008000;">*/</span>
<span style="color: #008080;">112</span>     <span style="color: #0000ff;">public</span> $name = <span style="color: #800000;">'</span><span style="color: #800000;">My Application</span><span style="color: #800000;">'</span><span style="color: #000000;">;
</span><span style="color: #008080;">113</span>     <span style="color: #008000;">/*</span><span style="color: #008000;">*
</span><span style="color: #008080;">114</span> <span style="color: #008000;">     * @var string the version of this application.此应用程序的版本。
</span><span style="color: #008080;">115</span>      <span style="color: #008000;">*/</span>
<span style="color: #008080;">116</span>     <span style="color: #0000ff;">public</span> $version = <span style="color: #800000;">'</span><span style="color: #800000;">1.0</span><span style="color: #800000;">'</span><span style="color: #000000;">;
</span><span style="color: #008080;">117</span>     <span style="color: #008000;">/*</span><span style="color: #008000;">*
</span><span style="color: #008080;">118</span> <span style="color: #008000;">     * @var string the charset currently used for the application.目前使用的字符集。
</span><span style="color: #008080;">119</span>      <span style="color: #008000;">*/</span>
<span style="color: #008080;">120</span>     <span style="color: #0000ff;">public</span> $charset = <span style="color: #800000;">'</span><span style="color: #800000;">UTF-8</span><span style="color: #800000;">'</span><span style="color: #000000;">;
</span><span style="color: #008080;">121</span>     <span style="color: #008000;">/*</span><span style="color: #008000;">*
</span><span style="color: #008080;">122</span> <span style="color: #008000;">     * @var string the language that is meant to be used for end users. It is recommended that you
</span><span style="color: #008080;">123</span> <span style="color: #008000;">     * use [IETF language tags](</span><span style="color: #008000; text-decoration: underline;">http://en.wikipedia.org/wiki/IETF_language_tag</span><span style="color: #008000;">). For example, `en` stands
</span><span style="color: #008080;">124</span> <span style="color: #008000;">     * for English, while `en-US` stands for English (United States).
</span><span style="color: #008080;">125</span> <span style="color: #008000;">     * 用来作为终端用户使用的语言
</span><span style="color: #008080;">126</span> <span style="color: #008000;">     * @see sourceLanguage
</span><span style="color: #008080;">127</span>      <span style="color: #008000;">*/</span>
<span style="color: #008080;">128</span>     <span style="color: #0000ff;">public</span> $language = <span style="color: #800000;">'</span><span style="color: #800000;">en-US</span><span style="color: #800000;">'</span><span style="color: #000000;">;
</span><span style="color: #008080;">129</span>     <span style="color: #008000;">/*</span><span style="color: #008000;">*
</span><span style="color: #008080;">130</span> <span style="color: #008000;">     * @var string the language that the application is written in. This mainly refers to
</span><span style="color: #008080;">131</span> <span style="color: #008000;">     * the language that the messages and view files are written in.
</span><span style="color: #008080;">132</span> <span style="color: #008000;">     * 应用程序编写的语言。
</span><span style="color: #008080;">133</span> <span style="color: #008000;">     * @see language
</span><span style="color: #008080;">134</span>      <span style="color: #008000;">*/</span>
<span style="color: #008080;">135</span>     <span style="color: #0000ff;">public</span> $sourceLanguage = <span style="color: #800000;">'</span><span style="color: #800000;">en-US</span><span style="color: #800000;">'</span><span style="color: #000000;">;
</span><span style="color: #008080;">136</span>     <span style="color: #008000;">/*</span><span style="color: #008000;">*
</span><span style="color: #008080;">137</span> <span style="color: #008000;">     * @var Controller the currently active controller instance当前活动控制器实例
</span><span style="color: #008080;">138</span>      <span style="color: #008000;">*/</span>
<span style="color: #008080;">139</span>     <span style="color: #0000ff;">public</span><span style="color: #000000;"> $controller;
</span><span style="color: #008080;">140</span>     <span style="color: #008000;">/*</span><span style="color: #008000;">*
</span><span style="color: #008080;">141</span> <span style="color: #008000;">     * @var string|boolean the layout that should be applied for views in this application. Defaults to 'main'.
</span><span style="color: #008080;">142</span> <span style="color: #008000;">     * If this is false, layout will be disabled.
</span><span style="color: #008080;">143</span> <span style="color: #008000;">     * 该应用程序中应用的布局。
</span><span style="color: #008080;">144</span>      <span style="color: #008000;">*/</span>
<span style="color: #008080;">145</span>     <span style="color: #0000ff;">public</span> $layout = <span style="color: #800000;">'</span><span style="color: #800000;">main</span><span style="color: #800000;">'</span><span style="color: #000000;">;
</span><span style="color: #008080;">146</span>     <span style="color: #008000;">/*</span><span style="color: #008000;">*
</span><span style="color: #008080;">147</span> <span style="color: #008000;">     * @var string the requested route请求的路径    请求的路径
</span><span style="color: #008080;">148</span>      <span style="color: #008000;">*/</span>
<span style="color: #008080;">149</span>     <span style="color: #0000ff;">public</span><span style="color: #000000;"> $requestedRoute;
</span><span style="color: #008080;">150</span>     <span style="color: #008000;">/*</span><span style="color: #008000;">*
</span><span style="color: #008080;">151</span> <span style="color: #008000;">     * @var Action the requested Action. If null, it means the request cannot be resolved into an action.
</span><span style="color: #008080;">152</span> <span style="color: #008000;">     * 操作所要求的行动
</span><span style="color: #008080;">153</span>      <span style="color: #008000;">*/</span>
<span style="color: #008080;">154</span>     <span style="color: #0000ff;">public</span><span style="color: #000000;"> $requestedAction;
</span><span style="color: #008080;">155</span>     <span style="color: #008000;">/*</span><span style="color: #008000;">*
</span><span style="color: #008080;">156</span> <span style="color: #008000;">     * @var array the parameters supplied to the requested action.
</span><span style="color: #008080;">157</span> <span style="color: #008000;">     * 所请求的动作提供的参数。
</span><span style="color: #008080;">158</span>      <span style="color: #008000;">*/</span>
<span style="color: #008080;">159</span>     <span style="color: #0000ff;">public</span><span style="color: #000000;"> $requestedParams;
</span><span style="color: #008080;">160</span>     <span style="color: #008000;">/*</span><span style="color: #008000;">*
</span><span style="color: #008080;">161</span> <span style="color: #008000;">     * @var array list of installed Yii extensions. Each array element represents a single extension
</span><span style="color: #008080;">162</span> <span style="color: #008000;">     * with the following structure:
</span><span style="color: #008080;">163</span> <span style="color: #008000;">     * 安装Yii扩展名列表。每个数组元素代表一个扩展
</span><span style="color: #008080;">164</span> <span style="color: #008000;">     *
</span><span style="color: #008080;">165</span> <span style="color: #008000;">     * ~~~
</span><span style="color: #008080;">166</span> <span style="color: #008000;">     * [
</span><span style="color: #008080;">167</span> <span style="color: #008000;">     *     'name' => 'extension name',
</span><span style="color: #008080;">168</span> <span style="color: #008000;">     *     'version' => 'version number',
</span><span style="color: #008080;">169</span> <span style="color: #008000;">     *     'bootstrap' => 'BootstrapClassName',  // optional, may also be a configuration array
</span><span style="color: #008080;">170</span> <span style="color: #008000;">     *     'alias' => [
</span><span style="color: #008080;">171</span> <span style="color: #008000;">     *         '@alias1' => 'to/path1',
</span><span style="color: #008080;">172</span> <span style="color: #008000;">     *         '@alias2' => 'to/path2',
</span><span style="color: #008080;">173</span> <span style="color: #008000;">     *     ],
</span><span style="color: #008080;">174</span> <span style="color: #008000;">     * ]
</span><span style="color: #008080;">175</span> <span style="color: #008000;">     * ~~~
</span><span style="color: #008080;">176</span> <span style="color: #008000;">     *
</span><span style="color: #008080;">177</span> <span style="color: #008000;">     * The "bootstrap" class listed above will be instantiated during the application
</span><span style="color: #008080;">178</span> <span style="color: #008000;">     * [[bootstrap()|bootstrapping process]]. If the class implements [[BootstrapInterface]],
</span><span style="color: #008080;">179</span> <span style="color: #008000;">     * its [[BootstrapInterface::bootstrap()|bootstrap()]] method will be also be called.
</span><span style="color: #008080;">180</span> <span style="color: #008000;">     *
</span><span style="color: #008080;">181</span> <span style="color: #008000;">     * If not set explicitly in the application config, this property will be populated with the contents of
</span><span style="color: #008080;">182</span> <span style="color: #008000;">     * 如果在应用程序配置中没有设置,该属性将填充到内容
</span><span style="color: #008080;">183</span> <span style="color: #008000;">     * @vendor/yiisoft/extensions.php`.
</span><span style="color: #008080;">184</span>      <span style="color: #008000;">*/</span>
<span style="color: #008080;">185</span>     <span style="color: #0000ff;">public</span><span style="color: #000000;"> $extensions;
</span><span style="color: #008080;">186</span>     <span style="color: #008000;">/*</span><span style="color: #008000;">*
</span><span style="color: #008080;">187</span> <span style="color: #008000;">     * @var array list of components that should be run during the application [[bootstrap()|bootstrapping process]].
</span><span style="color: #008080;">188</span> <span style="color: #008000;">     * 组件的列表,运行在 [[bootstrap()|bootstrapping process]]中的应用
</span><span style="color: #008080;">189</span> <span style="color: #008000;">     * Each component may be specified in one of the following formats:
</span><span style="color: #008080;">190</span> <span style="color: #008000;">     *
</span><span style="color: #008080;">191</span> <span style="color: #008000;">     * - an application component ID as specified via [[components]].
</span><span style="color: #008080;">192</span> <span style="color: #008000;">     * - a module ID as specified via [[modules]].
</span><span style="color: #008080;">193</span> <span style="color: #008000;">     * - a class name.
</span><span style="color: #008080;">194</span> <span style="color: #008000;">     * - a configuration array.
</span><span style="color: #008080;">195</span> <span style="color: #008000;">     *
</span><span style="color: #008080;">196</span> <span style="color: #008000;">     * During the bootstrapping process, each component will be instantiated. If the component class
</span><span style="color: #008080;">197</span> <span style="color: #008000;">     * implements [[BootstrapInterface]], its [[BootstrapInterface::bootstrap()|bootstrap()]] method
</span><span style="color: #008080;">198</span> <span style="color: #008000;">     * will be also be called.
</span><span style="color: #008080;">199</span> <span style="color: #008000;">     * 在整个启动过程中,每个组件被实例化。如果组件类提到 [[BootstrapInterface]], 
</span><span style="color: #008080;">200</span> <span style="color: #008000;">     * [[BootstrapInterface::bootstrap()|bootstrap()]]方法也会调用
</span><span style="color: #008080;">201</span>      <span style="color: #008000;">*/</span>
<span style="color: #008080;">202</span>     <span style="color: #0000ff;">public</span> $bootstrap =<span style="color: #000000;"> [];
</span><span style="color: #008080;">203</span>     <span style="color: #008000;">/*</span><span style="color: #008000;">*
</span><span style="color: #008080;">204</span> <span style="color: #008000;">     * @var integer the current application state during a request handling life cycle.
</span><span style="color: #008080;">205</span> <span style="color: #008000;">     * This property is managed by the application. Do not modify this property.    
</span><span style="color: #008080;">206</span> <span style="color: #008000;">     * 在请求处理生命周期中的当前应用程序状态。属性由应用程序管理。不要修改此属性。
</span><span style="color: #008080;">207</span>      <span style="color: #008000;">*/</span>
<span style="color: #008080;">208</span>     <span style="color: #0000ff;">public</span><span style="color: #000000;"> $state;
</span><span style="color: #008080;">209</span>     <span style="color: #008000;">/*</span><span style="color: #008000;">*
</span><span style="color: #008080;">210</span> <span style="color: #008000;">     * @var array list of loaded modules indexed by their class names.
</span><span style="color: #008080;">211</span> <span style="color: #008000;">     * 加载模块列表由它们的类名称索引组成。
</span><span style="color: #008080;">212</span>      <span style="color: #008000;">*/</span>
<span style="color: #008080;">213</span>     <span style="color: #0000ff;">public</span> $loadedModules =<span style="color: #000000;"> [];
</span><span style="color: #008080;">214</span> 
<span style="color: #008080;">215</span> 
<span style="color: #008080;">216</span>     <span style="color: #008000;">/*</span><span style="color: #008000;">*
</span><span style="color: #008080;">217</span> <span style="color: #008000;">     * Constructor.构造函数
</span><span style="color: #008080;">218</span> <span style="color: #008000;">     * @param array $config name-value pairs that will be used to initialize the object properties.
</span><span style="color: #008080;">219</span> <span style="color: #008000;">     * Note that the configuration must contain both [[id]] and [[basePath]].
</span><span style="color: #008080;">220</span> <span style="color: #008000;">     * 用来初始化对象属性的 name-value 注意配置必须包含[[id]] 和[[basePath]].
</span><span style="color: #008080;">221</span> <span style="color: #008000;">     * @throws InvalidConfigException if either [[id]] or [[basePath]] configuration is missing.
</span><span style="color: #008080;">222</span> <span style="color: #008000;">     * 如果是修改[[id]] 或[[basePath]] 则配置丢失。
</span><span style="color: #008080;">223</span>      <span style="color: #008000;">*/</span>
<span style="color: #008080;">224</span>     <span style="color: #0000ff;">public</span> function __construct($config =<span style="color: #000000;"> [])
</span><span style="color: #008080;">225</span> <span style="color: #000000;">    {
</span><span style="color: #008080;">226</span>         Yii::$app = $<span style="color: #0000ff;">this</span>;<span style="color: #008000;">//</span><span style="color: #008000;"> 将自身的实例绑到Yii的$app上</span>
<span style="color: #008080;">227</span>         $<span style="color: #0000ff;">this</span>->setInstance($<span style="color: #0000ff;">this</span>);<span style="color: #008000;">//</span><span style="color: #008000;"> 将自身加入到loadedModules中</span>
<span style="color: #008080;">228</span> 
<span style="color: #008080;">229</span>         $<span style="color: #0000ff;">this</span>->state = self::STATE_BEGIN;<span style="color: #008000;">//</span><span style="color: #008000;"> 设置状态为刚开始
</span><span style="color: #008080;">230</span> 
<span style="color: #008080;">231</span>         <span style="color: #008000;">//</span><span style="color: #008000;"> 做预处理配置</span>
<span style="color: #008080;">232</span>         $<span style="color: #0000ff;">this</span>-><span style="color: #000000;">preInit($config);
</span><span style="color: #008080;">233</span> 
<span style="color: #008080;">234</span>         $<span style="color: #0000ff;">this</span>-><span style="color: #000000;">registerErrorHandler($config);
</span><span style="color: #008080;">235</span> 
<span style="color: #008080;">236</span> <span style="color: #000000;">        Component::__construct($config);
</span><span style="color: #008080;">237</span> <span style="color: #000000;">    }
</span><span style="color: #008080;">238</span> 
<span style="color: #008080;">239</span>     <span style="color: #008000;">/*</span><span style="color: #008000;">*
</span><span style="color: #008080;">240</span> <span style="color: #008000;">     * Pre-initializes the application. 初始化应用。
</span><span style="color: #008080;">241</span> <span style="color: #008000;">     * This method is called at the beginning of the application constructor.
</span><span style="color: #008080;">242</span> <span style="color: #008000;">     * It initializes several important application properties.
</span><span style="color: #008080;">243</span> <span style="color: #008000;">     * 在构造函数中调用该方法,用于初始化一些重要的属性
</span><span style="color: #008080;">244</span> <span style="color: #008000;">     * If you override this method, please make sure you call the parent implementation.
</span><span style="color: #008080;">245</span> <span style="color: #008000;">     * @param array $config the application configuration   应用的配置
</span><span style="color: #008080;">246</span> <span style="color: #008000;">     * @throws InvalidConfigException if either [[id]] or [[basePath]] configuration is missing.
</span><span style="color: #008080;">247</span>      <span style="color: #008000;">*/</span>
<span style="color: #008080;">248</span>     <span style="color: #0000ff;">public</span> function preInit(&<span style="color: #000000;">$config)
</span><span style="color: #008080;">249</span> <span style="color: #000000;">    {
</span><span style="color: #008080;">250</span>          <span style="color: #008000;">//</span><span style="color: #008000;"> 使用了&符号,表示$config的修改会保留</span>
<span style="color: #008080;">251</span>         <span style="color: #0000ff;">if</span> (!isset($config[<span style="color: #800000;">'</span><span style="color: #800000;">id</span><span style="color: #800000;">'</span>])) {<span style="color: #008000;">//</span><span style="color: #008000;">判断配置中是否有application ID ,如果没有,抛出异常</span>
<span style="color: #008080;">252</span>             <span style="color: #0000ff;">throw</span> <span style="color: #0000ff;">new</span> InvalidConfigException(<span style="color: #800000;">'</span><span style="color: #800000;">The "id" configuration for the Application is required.</span><span style="color: #800000;">'</span><span style="color: #000000;">);
</span><span style="color: #008080;">253</span> <span style="color: #000000;">        }
</span><span style="color: #008080;">254</span>         <span style="color: #0000ff;">if</span> (isset($config[<span style="color: #800000;">'</span><span style="color: #800000;">basePath</span><span style="color: #800000;">'</span><span style="color: #000000;">])) {
</span><span style="color: #008080;">255</span>             <span style="color: #008000;">//</span><span style="color: #008000;"> 是否配置项目的root路径</span>
<span style="color: #008080;">256</span>             $<span style="color: #0000ff;">this</span>->setBasePath($config[<span style="color: #800000;">'</span><span style="color: #800000;">basePath</span><span style="color: #800000;">'</span><span style="color: #000000;">]);
</span><span style="color: #008080;">257</span>              <span style="color: #008000;">//</span><span style="color: #008000;">赋值给模块的_basepath属性,并在设置后删除</span>
<span style="color: #008080;">258</span>             unset($config[<span style="color: #800000;">'</span><span style="color: #800000;">basePath</span><span style="color: #800000;">'</span><span style="color: #000000;">]);
</span><span style="color: #008080;">259</span>         } <span style="color: #0000ff;">else</span> {<span style="color: #008000;">//</span><span style="color: #008000;">否则抛出异常</span>
<span style="color: #008080;">260</span>             <span style="color: #0000ff;">throw</span> <span style="color: #0000ff;">new</span> InvalidConfigException(<span style="color: #800000;">'</span><span style="color: #800000;">The "basePath" configuration for the Application is required.</span><span style="color: #800000;">'</span><span style="color: #000000;">);
</span><span style="color: #008080;">261</span> <span style="color: #000000;">        }
</span><span style="color: #008080;">262</span>         <span style="color: #008000;">//</span><span style="color: #008000;">如果配置文件中设置了 vendorPath 使用配置的值,并在设置后删除,否则使用默认的</span>
<span style="color: #008080;">263</span>         <span style="color: #0000ff;">if</span> (isset($config[<span style="color: #800000;">'</span><span style="color: #800000;">vendorPath</span><span style="color: #800000;">'</span><span style="color: #000000;">])) {
</span><span style="color: #008080;">264</span>             $<span style="color: #0000ff;">this</span>->setVendorPath($config[<span style="color: #800000;">'</span><span style="color: #800000;">vendorPath</span><span style="color: #800000;">'</span><span style="color: #000000;">]);
</span><span style="color: #008080;">265</span>             unset($config[<span style="color: #800000;">'</span><span style="color: #800000;">vendorPath</span><span style="color: #800000;">'</span><span style="color: #000000;">]);
</span><span style="color: #008080;">266</span>         } <span style="color: #0000ff;">else</span><span style="color: #000000;"> {
</span><span style="color: #008080;">267</span>             <span style="color: #008000;">//</span><span style="color: #008000;"> set "@vendor"</span>
<span style="color: #008080;">268</span>             $<span style="color: #0000ff;">this</span>-><span style="color: #000000;">getVendorPath();
</span><span style="color: #008080;">269</span> <span style="color: #000000;">        }
</span><span style="color: #008080;">270</span>         <span style="color: #008000;">//</span><span style="color: #008000;">如果配置文件中设置了 runtimePath 使用配置的值,并在设置后删除,否则使用默认的</span>
<span style="color: #008080;">271</span>         <span style="color: #0000ff;">if</span> (isset($config[<span style="color: #800000;">'</span><span style="color: #800000;">runtimePath</span><span style="color: #800000;">'</span><span style="color: #000000;">])) {
</span><span style="color: #008080;">272</span>             $<span style="color: #0000ff;">this</span>->setRuntimePath($config[<span style="color: #800000;">'</span><span style="color: #800000;">runtimePath</span><span style="color: #800000;">'</span><span style="color: #000000;">]);
</span><span style="color: #008080;">273</span>             unset($config[<span style="color: #800000;">'</span><span style="color: #800000;">runtimePath</span><span style="color: #800000;">'</span><span style="color: #000000;">]);
</span><span style="color: #008080;">274</span>         } <span style="color: #0000ff;">else</span><span style="color: #000000;"> {
</span><span style="color: #008080;">275</span>             <span style="color: #008000;">//</span><span style="color: #008000;"> set "@runtime"</span>
<span style="color: #008080;">276</span>             $<span style="color: #0000ff;">this</span>-><span style="color: #000000;">getRuntimePath();
</span><span style="color: #008080;">277</span> <span style="color: #000000;">        }
</span><span style="color: #008080;">278</span>          <span style="color: #008000;">//</span><span style="color: #008000;">如果配置文件中设置了 timeZone 使用配置的值,并在设置后删除,否则使用默认的时区</span>
<span style="color: #008080;">279</span>         <span style="color: #0000ff;">if</span> (isset($config[<span style="color: #800000;">'</span><span style="color: #800000;">timeZone</span><span style="color: #800000;">'</span><span style="color: #000000;">])) {
</span><span style="color: #008080;">280</span>             $<span style="color: #0000ff;">this</span>->setTimeZone($config[<span style="color: #800000;">'</span><span style="color: #800000;">timeZone</span><span style="color: #800000;">'</span><span style="color: #000000;">]);
</span><span style="color: #008080;">281</span>             unset($config[<span style="color: #800000;">'</span><span style="color: #800000;">timeZone</span><span style="color: #800000;">'</span><span style="color: #000000;">]);
</span><span style="color: #008080;">282</span>         } elseif (!ini_get(<span style="color: #800000;">'</span><span style="color: #800000;">date.timezone</span><span style="color: #800000;">'</span><span style="color: #000000;">)) {
</span><span style="color: #008080;">283</span>             $<span style="color: #0000ff;">this</span>->setTimeZone(<span style="color: #800000;">'</span><span style="color: #800000;">UTC</span><span style="color: #800000;">'</span><span style="color: #000000;">);
</span><span style="color: #008080;">284</span> <span style="color: #000000;">        }
</span><span style="color: #008080;">285</span> 
<span style="color: #008080;">286</span>         <span style="color: #008000;">//</span><span style="color: #008000;"> merge core components with custom components</span>
<span style="color: #008080;">287</span>         <span style="color: #0000ff;">foreach</span> ($<span style="color: #0000ff;">this</span>->coreComponents() <span style="color: #0000ff;">as</span> $id =><span style="color: #000000;"> $component) {
</span><span style="color: #008080;">288</span>             <span style="color: #0000ff;">if</span> (!isset($config[<span style="color: #800000;">'</span><span style="color: #800000;">components</span><span style="color: #800000;">'</span><span style="color: #000000;">][$id])) {
</span><span style="color: #008080;">289</span>                 <span style="color: #008000;">//</span><span style="color: #008000;"> 如果配置中没有配置相应的核心component,就赋给它</span>
<span style="color: #008080;">290</span>                 $config[<span style="color: #800000;">'</span><span style="color: #800000;">components</span><span style="color: #800000;">'</span>][$id] =<span style="color: #000000;"> $component;
</span><span style="color: #008080;">291</span>             } elseif (is_array($config[<span style="color: #800000;">'</span><span style="color: #800000;">components</span><span style="color: #800000;">'</span>][$id]) && !isset($config[<span style="color: #800000;">'</span><span style="color: #800000;">components</span><span style="color: #800000;">'</span>][$id][<span style="color: #800000;">'</span><span style="color: #800000;">class</span><span style="color: #800000;">'</span><span style="color: #000000;">])) {
</span><span style="color: #008080;">292</span>                  <span style="color: #008000;">//</span><span style="color: #008000;"> 如果存在相应的核心component,但没有定义它的class,就直接赋到class的key上</span>
<span style="color: #008080;">293</span>                 $config[<span style="color: #800000;">'</span><span style="color: #800000;">components</span><span style="color: #800000;">'</span>][$id][<span style="color: #800000;">'</span><span style="color: #800000;">class</span><span style="color: #800000;">'</span>] = $component[<span style="color: #800000;">'</span><span style="color: #800000;">class</span><span style="color: #800000;">'</span><span style="color: #000000;">];
</span><span style="color: #008080;">294</span> <span style="color: #000000;">            }
</span><span style="color: #008080;">295</span> <span style="color: #000000;">        }
</span><span style="color: #008080;">296</span> <span style="color: #000000;">    }
</span><span style="color: #008080;">297</span> 
<span style="color: #008080;">298</span>     <span style="color: #008000;">/*</span><span style="color: #008000;">*
</span><span style="color: #008080;">299</span> <span style="color: #008000;">     * @inheritdoc
</span><span style="color: #008080;">300</span>      <span style="color: #008000;">*/</span>
<span style="color: #008080;">301</span>     <span style="color: #0000ff;">public</span><span style="color: #000000;"> function init()
</span><span style="color: #008080;">302</span> <span style="color: #000000;">    {
</span><span style="color: #008080;">303</span>         $<span style="color: #0000ff;">this</span>->state =<span style="color: #000000;"> self::STATE_INIT;
</span><span style="color: #008080;">304</span>         $<span style="color: #0000ff;">this</span>-><span style="color: #000000;">bootstrap();
</span><span style="color: #008080;">305</span> <span style="color: #000000;">    }
</span><span style="color: #008080;">306</span> 
<span style="color: #008080;">307</span>     <span style="color: #008000;">/*</span><span style="color: #008000;">*
</span><span style="color: #008080;">308</span> <span style="color: #008000;">     * Initializes extensions and executes bootstrap components.初始化扩展并执行初始化程序组件
</span><span style="color: #008080;">309</span> <span style="color: #008000;">     * This method is called by [[init()]] after the application has been fully configured.
</span><span style="color: #008080;">310</span> <span style="color: #008000;">     * 该方法在应用完全配置后被[[init()]]调用
</span><span style="color: #008080;">311</span> <span style="color: #008000;">     * If you override this method, make sure you also call the parent implementation.
</span><span style="color: #008080;">312</span>      <span style="color: #008000;">*/</span>
<span style="color: #008080;">313</span>     <span style="color: #0000ff;">protected</span><span style="color: #000000;"> function bootstrap()
</span><span style="color: #008080;">314</span> <span style="color: #000000;">    {
</span><span style="color: #008080;">315</span>         <span style="color: #0000ff;">if</span> ($<span style="color: #0000ff;">this</span>->extensions === <span style="color: #0000ff;">null</span>) {<span style="color: #008000;">//</span><span style="color: #008000;">如果没有配置,则调用Yii的默认扩展组件</span>
<span style="color: #008080;">316</span>             $file = Yii::getAlias(<span style="color: #800000;">'</span><span style="color: #800000;">@vendor/yiisoft/extensions.php</span><span style="color: #800000;">'</span><span style="color: #000000;">);
</span><span style="color: #008080;">317</span>             $<span style="color: #0000ff;">this</span>->extensions = is_file($file) ?<span style="color: #000000;"> include($file) : [];
</span><span style="color: #008080;">318</span> <span style="color: #000000;">        }
</span><span style="color: #008080;">319</span>         <span style="color: #0000ff;">foreach</span> ($<span style="color: #0000ff;">this</span>->extensions <span style="color: #0000ff;">as</span><span style="color: #000000;"> $extension) {
</span><span style="color: #008080;">320</span>             <span style="color: #0000ff;">if</span> (!empty($extension[<span style="color: #800000;">'</span><span style="color: #800000;">alias</span><span style="color: #800000;">'</span>])) {<span style="color: #008000;">//</span><span style="color: #008000;">如果扩展组件有设置别名</span>
<span style="color: #008080;">321</span>                 <span style="color: #0000ff;">foreach</span> ($extension[<span style="color: #800000;">'</span><span style="color: #800000;">alias</span><span style="color: #800000;">'</span>] <span style="color: #0000ff;">as</span> $name =><span style="color: #000000;"> $path) {
</span><span style="color: #008080;">322</span>                     Yii::setAlias($name, $path);<span style="color: #008000;">//</span><span style="color: #008000;">将给扩展的别名注册到别名数组中</span>
<span style="color: #008080;">323</span> <span style="color: #000000;">                }
</span><span style="color: #008080;">324</span> <span style="color: #000000;">            }
</span><span style="color: #008080;">325</span>             <span style="color: #0000ff;">if</span> (isset($extension[<span style="color: #800000;">'</span><span style="color: #800000;">bootstrap</span><span style="color: #800000;">'</span>])) {<span style="color: #008000;">//</span><span style="color: #008000;">如果扩展组件有[[bootstrap]]配置 则初始化给扩展组件</span>
<span style="color: #008080;">326</span>                 $component = Yii::createObject($extension[<span style="color: #800000;">'</span><span style="color: #800000;">bootstrap</span><span style="color: #800000;">'</span><span style="color: #000000;">]);
</span><span style="color: #008080;">327</span>                 <span style="color: #0000ff;">if</span><span style="color: #000000;"> ($component instanceof BootstrapInterface) {
</span><span style="color: #008080;">328</span>                     Yii::trace(<span style="color: #800000;">"</span><span style="color: #800000;">Bootstrap with </span><span style="color: #800000;">"</span> . get_class($component) . <span style="color: #800000;">'</span><span style="color: #800000;">::bootstrap()</span><span style="color: #800000;">'</span><span style="color: #000000;">, __METHOD__);
</span><span style="color: #008080;">329</span>                     $component->bootstrap($<span style="color: #0000ff;">this</span><span style="color: #000000;">);
</span><span style="color: #008080;">330</span>                 } <span style="color: #0000ff;">else</span><span style="color: #000000;"> {
</span><span style="color: #008080;">331</span>                     Yii::trace(<span style="color: #800000;">"</span><span style="color: #800000;">Bootstrap with </span><span style="color: #800000;">"</span><span style="color: #000000;"> . get_class($component), __METHOD__);
</span><span style="color: #008080;">332</span> <span style="color: #000000;">                }
</span><span style="color: #008080;">333</span> <span style="color: #000000;">            }
</span><span style="color: #008080;">334</span> <span style="color: #000000;">        }
</span><span style="color: #008080;">335</span> 
<span style="color: #008080;">336</span>         <span style="color: #0000ff;">foreach</span> ($<span style="color: #0000ff;">this</span>->bootstrap <span style="color: #0000ff;">as</span> $<span style="color: #0000ff;">class</span><span style="color: #000000;">) {
</span><span style="color: #008080;">337</span>             $component = <span style="color: #0000ff;">null</span><span style="color: #000000;">;
</span><span style="color: #008080;">338</span>             <span style="color: #0000ff;">if</span> (is_string($<span style="color: #0000ff;">class</span><span style="color: #000000;">)) {
</span><span style="color: #008080;">339</span>                 <span style="color: #0000ff;">if</span> ($<span style="color: #0000ff;">this</span>->has($<span style="color: #0000ff;">class</span><span style="color: #000000;">)) {
</span><span style="color: #008080;">340</span>                     $component = $<span style="color: #0000ff;">this</span>-><span style="color: #0000ff;">get</span>($<span style="color: #0000ff;">class</span><span style="color: #000000;">);
</span><span style="color: #008080;">341</span>                 } elseif ($<span style="color: #0000ff;">this</span>->hasModule($<span style="color: #0000ff;">class</span><span style="color: #000000;">)) {
</span><span style="color: #008080;">342</span>                     $component = $<span style="color: #0000ff;">this</span>->getModule($<span style="color: #0000ff;">class</span><span style="color: #000000;">);
</span><span style="color: #008080;">343</span>                 } elseif (strpos($<span style="color: #0000ff;">class</span>, <span style="color: #800000;">'</span><span style="color: #800000;">\\</span><span style="color: #800000;">'</span>) === <span style="color: #0000ff;">false</span><span style="color: #000000;">) {
</span><span style="color: #008080;">344</span>                     <span style="color: #0000ff;">throw</span> <span style="color: #0000ff;">new</span> InvalidConfigException(<span style="color: #800000;">"</span><span style="color: #800000;">Unknown bootstrapping component ID: $class</span><span style="color: #800000;">"</span><span style="color: #000000;">);
</span><span style="color: #008080;">345</span> <span style="color: #000000;">                }
</span><span style="color: #008080;">346</span> <span style="color: #000000;">            }
</span><span style="color: #008080;">347</span>             <span style="color: #0000ff;">if</span> (!isset($component)) {<span style="color: #008000;">//</span><span style="color: #008000;">如果不存在,则调用Yii创建对象</span>
<span style="color: #008080;">348</span>                 $component = Yii::createObject($<span style="color: #0000ff;">class</span><span style="color: #000000;">);
</span><span style="color: #008080;">349</span> <span style="color: #000000;">            }
</span><span style="color: #008080;">350</span> 
<span style="color: #008080;">351</span>             <span style="color: #0000ff;">if</span><span style="color: #000000;"> ($component instanceof BootstrapInterface) {
</span><span style="color: #008080;">352</span>                 Yii::trace(<span style="color: #800000;">"</span><span style="color: #800000;">Bootstrap with </span><span style="color: #800000;">"</span> . get_class($component) . <span style="color: #800000;">'</span><span style="color: #800000;">::bootstrap()</span><span style="color: #800000;">'</span><span style="color: #000000;">, __METHOD__);
</span><span style="color: #008080;">353</span>                 $component->bootstrap($<span style="color: #0000ff;">this</span><span style="color: #000000;">);
</span><span style="color: #008080;">354</span>             } <span style="color: #0000ff;">else</span><span style="color: #000000;"> {
</span><span style="color: #008080;">355</span>                 Yii::trace(<span style="color: #800000;">"</span><span style="color: #800000;">Bootstrap with </span><span style="color: #800000;">"</span><span style="color: #000000;"> . get_class($component), __METHOD__);
</span><span style="color: #008080;">356</span> <span style="color: #000000;">            }
</span><span style="color: #008080;">357</span> <span style="color: #000000;">        }
</span><span style="color: #008080;">358</span>     }
Copy after login

未完待续。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template