Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
e50d9e82
Commit
e50d9e82
authored
Nov 02, 2014
by
Nobuo Kihara
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:yiisoft/yii2
parents
2fe64eea
ff3ef7b9
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
5 additions
and
7 deletions
+5
-7
structure-applications.md
docs/guide-zh-CN/structure-applications.md
+0
-1
structure-controllers.md
docs/guide-zh-CN/structure-controllers.md
+2
-3
output-formatter.md
docs/guide/output-formatter.md
+1
-1
rest-authentication.md
docs/guide/rest-authentication.md
+1
-1
BaseMigrateController.php
framework/console/controllers/BaseMigrateController.php
+1
-1
No files found.
docs/guide-zh-CN/structure-applications.md
View file @
e50d9e82
...
@@ -389,7 +389,6 @@ $width = \Yii::$app->params['thumbnail.size'][0];
...
@@ -389,7 +389,6 @@ $width = \Yii::$app->params['thumbnail.size'][0];
如果 [视图路径](#viewPath) 使用默认值,默认的布局路径别名为`@app/views/layouts`。
如果 [视图路径](#viewPath) 使用默认值,默认的布局路径别名为`@app/views/layouts`。
该属性需要配置成一个目录或 路径 [别名](concept-aliases.md)。
该属性需要配置成一个目录或 路径 [别名](concept-aliases.md)。
You may configure it as a directory or a path [alias](concept-aliases.md).
#### [[yii\base\Application::runtimePath|runtimePath]] <a name="runtimePath"></a>
#### [[yii\base\Application::runtimePath|runtimePath]] <a name="runtimePath"></a>
...
...
docs/guide-zh-CN/structure-controllers.md
View file @
e50d9e82
...
@@ -283,7 +283,7 @@ class HelloWorldAction extends Action
...
@@ -283,7 +283,7 @@ class HelloWorldAction extends Action
### 操作结果 <a name="action-results"></a>
### 操作结果 <a name="action-results"></a>
操作方法或独立操作的
`run()`
方法的返回值非常
中药
,它表示对应操作结果。
操作方法或独立操作的
`run()`
方法的返回值非常
重要
,它表示对应操作结果。
返回值可为
[
响应
](
runtime-responses.md
)
对象,作为响应发送给终端用户。
返回值可为
[
响应
](
runtime-responses.md
)
对象,作为响应发送给终端用户。
...
@@ -378,8 +378,7 @@ class SiteController extends Controller
...
@@ -378,8 +378,7 @@ class SiteController extends Controller
## 控制器生命周期 <a name="controller-lifecycle"></a>
## 控制器生命周期 <a name="controller-lifecycle"></a>
处理一个请求时,
[
应用主体
](
structure-applications.md
)
会根据请求
[
路由
](
#routes
)
创建一个控制器,will create a controller
处理一个请求时,
[
应用主体
](
structure-applications.md
)
会根据请求
[
路由
](
#routes
)
创建一个控制器,控制器经过以下生命周期来完成请求:
控制器经过以下生命周期来完成请求:
1.
在控制器创建和配置后,
[
[yii\base\Controller::init()
]
] 方法会被调用。
1.
在控制器创建和配置后,
[
[yii\base\Controller::init()
]
] 方法会被调用。
2.
控制器根据请求操作ID创建一个操作对象:
2.
控制器根据请求操作ID创建一个操作对象:
...
...
docs/guide/output-formatter.md
View file @
e50d9e82
...
@@ -113,7 +113,7 @@ echo Yii::$app->formatter->asDate('now', 'php:Y-m-d'); // 2014-10-06
...
@@ -113,7 +113,7 @@ echo Yii::$app->formatter->asDate('now', 'php:Y-m-d'); // 2014-10-06
### Time zones <a name="time-zones"></a>
### Time zones <a name="time-zones"></a>
When formatting date and time values, Yii will convert them to the [[yii\i18n\Formatter::timeZone|configured time zone]].
When formatting date and time values, Yii will convert them to the [[yii\i18n\Formatter::timeZone|configured time zone]].
Therefor the input value is assumed to be in UTC unless a time zone is explicitly given. For this reason
Therefor
e
the input value is assumed to be in UTC unless a time zone is explicitly given. For this reason
it is recommended to store all date and time values in UTC preferably as a UNIX timestamp, which is always UTC by definition.
it is recommended to store all date and time values in UTC preferably as a UNIX timestamp, which is always UTC by definition.
If the input value is in a time zone different from UTC, the time zone has to be stated explicitly like in the following example:
If the input value is in a time zone different from UTC, the time zone has to be stated explicitly like in the following example:
...
...
docs/guide/rest-authentication.md
View file @
e50d9e82
...
@@ -6,7 +6,7 @@ be used. Therefore, each request should come with some sort of authentication cr
...
@@ -6,7 +6,7 @@ be used. Therefore, each request should come with some sort of authentication cr
the user authentication status may not be maintained by sessions or cookies. A common practice is
the user authentication status may not be maintained by sessions or cookies. A common practice is
to send a secret access token with each request to authenticate the user. Since an access token
to send a secret access token with each request to authenticate the user. Since an access token
can be used to uniquely identify and authenticate a user,
**
API requests should always be sent
can be used to uniquely identify and authenticate a user,
**
API requests should always be sent
via HTTPS to prevent
from
man-in-the-middle (MitM) attacks
**
.
via HTTPS to prevent man-in-the-middle (MitM) attacks
**
.
There are different ways to send an access token:
There are different ways to send an access token:
...
...
framework/console/controllers/BaseMigrateController.php
View file @
e50d9e82
...
@@ -408,7 +408,7 @@ abstract class BaseMigrateController extends Controller
...
@@ -408,7 +408,7 @@ abstract class BaseMigrateController extends Controller
* ~~~
* ~~~
*
*
* @param integer $limit the maximum number of new migrations to be displayed.
* @param integer $limit the maximum number of new migrations to be displayed.
* If it is
0
, all available new migrations will be displayed.
* If it is
`all`
, all available new migrations will be displayed.
* @throws \yii\console\Exception if invalid limit value passed
* @throws \yii\console\Exception if invalid limit value passed
*/
*/
public
function
actionNew
(
$limit
=
10
)
public
function
actionNew
(
$limit
=
10
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment