From 58b55a56323a802d82d82a26d6b21f8fab3714f1 Mon Sep 17 00:00:00 2001 From: Alexaksandr Date: Tue, 20 Oct 2015 16:11:46 +0600 Subject: [PATCH] Russian translation, guide enhancements [skip ci] --- docs/guide-ru/runtime-overview.md | 22 ++++++++++++++++++++++ docs/guide-ru/structure-extensions.md | 2 +- docs/guide-ru/structure-views.md | 2 +- docs/guide/runtime-overview.md | 6 +++--- docs/guide/structure-views.md | 2 +- 5 files changed, 28 insertions(+), 6 deletions(-) create mode 100644 docs/guide-ru/runtime-overview.md diff --git a/docs/guide-ru/runtime-overview.md b/docs/guide-ru/runtime-overview.md new file mode 100644 index 0000000..2a40491 --- /dev/null +++ b/docs/guide-ru/runtime-overview.md @@ -0,0 +1,22 @@ +Обзор +======== + +Все запросы, обрабатываемые Yii приложением, проходят подобный путь. + +1. Пользователь создает запрос ко [входному скрипту](structure-entry-scripts.md) `web/index.php`. +2. Входной скрипт загружает [конфигурацию](concept-configurations.md) и создает экземпляр [приложения](structure-applications.md) для обработки запроса. +3. Приложение определяет запрошенный [маршрут](runtime-routing.md) при помощи компонента [request](runtime-requests.md). +4. Приложение создает экземпляр [контроллера](structure-controllers.md) для обработки запроса. +5. Контроллер создает экземпляр [действия](structure-controllers.md) и выполняет фильтры для этого действия. +6. При неудачном выполнении любого [фильтра](structure-filters.md), действие не выполняется. +7. При успешном выполнении всех фильтров, выполняется действие. +8. Действие загружает [модель](structure-models.md) данных, возможно, из базы данных. +9. Действие рендерит [представление](structure-views.md) и передает ему модель данных. +10. Результат рендеринга передается в компонент приложения [response](runtime-responses.md). +11. Компонент response посылает готовые данные пользователю. + +Ниже представлена диаграмма обработки запроса приложением. + +![Request Lifecycle](images/request-lifecycle.png) + +В данном разделе описаны подробности некоторых этапов обработки запроса. diff --git a/docs/guide-ru/structure-extensions.md b/docs/guide-ru/structure-extensions.md index 52cd30d..11e2573 100644 --- a/docs/guide-ru/structure-extensions.md +++ b/docs/guide-ru/structure-extensions.md @@ -2,7 +2,7 @@ ========== Расширения - это распространяемые программные пакеты, специально разработанные для использования в приложениях Yii и -содержащие готовые функции. Например, расширение [yiisoft/yii2-debug](tool-debugger.md) добавляет удобную отладочную +содержащие готовые функции. Например, расширение [yiisoft/yii2-debug](https://github.com/yiisoft/yii2-debug) добавляет удобную отладочную панель в нижнюю часть каждой страницы вашего приложения, чтобы помочь вам разобраться в том, как генерируются страницы. Вы можете использовать расширения для ускорения процесса разработки. Вы также можете оформить ваш код как расширение, чтобы поделиться с другими людьми результатами вашей работы. diff --git a/docs/guide-ru/structure-views.md b/docs/guide-ru/structure-views.md index 0593155..7679a92 100644 --- a/docs/guide-ru/structure-views.md +++ b/docs/guide-ru/structure-views.md @@ -523,7 +523,7 @@ $this->registerMetaTag(['name' => 'keywords', 'content' => 'yii, framework, php' параметра при вызове метода. К примеру, следующий код регистрирует два мета тэга "description", однако отрендерен будет только второй. -```html +```php $this->registerMetaTag(['name' => 'description', 'content' => 'Мой сайт сделан с помощью Yii!'], 'description'); $this->registerMetaTag(['name' => 'description', 'content' => 'Это сайт о забавных енотах.'], 'description'); ``` diff --git a/docs/guide/runtime-overview.md b/docs/guide/runtime-overview.md index ca6d849..b886f14 100644 --- a/docs/guide/runtime-overview.md +++ b/docs/guide/runtime-overview.md @@ -10,10 +10,10 @@ Each time when a Yii application handles a request, it undergoes a similar workf the [request](runtime-requests.md) application component. 4. The application creates a [controller](structure-controllers.md) instance to handle the request. 5. The controller creates an [action](structure-controllers.md) instance and performs the filters for the action. -6. If any filter fails, the action is cancelled. +6. If any [filter](structure-filters.md) fails, the action is cancelled. 7. If all filters pass, the action is executed. -8. The action loads a data model, possibly from a database. -9. The action renders a view, providing it with the data model. +8. The action loads a data [model](structure-models.md), possibly from a database. +9. The action renders a [view](structure-views.md), providing it with the data model. 10. The rendered result is returned to the [response](runtime-responses.md) application component. 11. The response component sends the rendered result to the user's browser. diff --git a/docs/guide/structure-views.md b/docs/guide/structure-views.md index 7e98a88..89b56f9 100644 --- a/docs/guide/structure-views.md +++ b/docs/guide/structure-views.md @@ -599,7 +599,7 @@ regardless whether the meta tags are the same or not. To make sure there is only a single instance of a meta tag type, you can specify a key as a second parameter when calling the method. For example, the following code registers two "description" meta tags. However, only the second one will be rendered. -```html +```php $this->registerMetaTag(['name' => 'description', 'content' => 'This is my cool website made with Yii!'], 'description'); $this->registerMetaTag(['name' => 'description', 'content' => 'This website is about funny raccoons.'], 'description'); ```