diff --git a/docs/guide-zh-CN/structure-applications.md b/docs/guide-zh-CN/structure-applications.md index 4e9ef19165..bd0435f99f 100644 --- a/docs/guide-zh-CN/structure-applications.md +++ b/docs/guide-zh-CN/structure-applications.md @@ -389,7 +389,6 @@ $width = \Yii::$app->params['thumbnail.size'][0]; 如果 [视图路径](#viewPath) 使用默认值,默认的布局路径别名为`@app/views/layouts`。 该属性需要配置成一个目录或 路径 [别名](concept-aliases.md)。 -You may configure it as a directory or a path [alias](concept-aliases.md). #### [[yii\base\Application::runtimePath|runtimePath]] diff --git a/docs/guide-zh-CN/structure-controllers.md b/docs/guide-zh-CN/structure-controllers.md index 703f246b5a..29c28b18e4 100644 --- a/docs/guide-zh-CN/structure-controllers.md +++ b/docs/guide-zh-CN/structure-controllers.md @@ -283,7 +283,7 @@ class HelloWorldAction extends Action ### 操作结果 -操作方法或独立操作的`run()`方法的返回值非常中药,它表示对应操作结果。 +操作方法或独立操作的`run()`方法的返回值非常重要,它表示对应操作结果。 返回值可为 [响应](runtime-responses.md) 对象,作为响应发送给终端用户。 @@ -378,8 +378,7 @@ class SiteController extends Controller ## 控制器生命周期 -处理一个请求时,[应用主体](structure-applications.md) 会根据请求[路由](#routes)创建一个控制器,will create a controller -控制器经过以下生命周期来完成请求: +处理一个请求时,[应用主体](structure-applications.md) 会根据请求[路由](#routes)创建一个控制器,控制器经过以下生命周期来完成请求: 1. 在控制器创建和配置后,[[yii\base\Controller::init()]] 方法会被调用。 2. 控制器根据请求操作ID创建一个操作对象: diff --git a/docs/guide/output-formatter.md b/docs/guide/output-formatter.md index 7ec3d591bc..d41a5d953f 100644 --- a/docs/guide/output-formatter.md +++ b/docs/guide/output-formatter.md @@ -113,7 +113,7 @@ echo Yii::$app->formatter->asDate('now', 'php:Y-m-d'); // 2014-10-06 ### Time zones 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 +Therefore 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. 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: diff --git a/docs/guide/rest-authentication.md b/docs/guide/rest-authentication.md index 2c6f7caf0a..b91214bd11 100644 --- a/docs/guide/rest-authentication.md +++ b/docs/guide/rest-authentication.md @@ -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 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 -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: diff --git a/framework/console/controllers/BaseMigrateController.php b/framework/console/controllers/BaseMigrateController.php index bf49f01998..82a1ee5f30 100644 --- a/framework/console/controllers/BaseMigrateController.php +++ b/framework/console/controllers/BaseMigrateController.php @@ -408,7 +408,7 @@ abstract class BaseMigrateController extends Controller * ~~~ * * @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 */ public function actionNew($limit = 10) @@ -642,4 +642,4 @@ abstract class BaseMigrateController extends Controller * @param string $version migration version name. */ abstract protected function removeMigrationHistory($version); -} \ No newline at end of file +}