Alexaksandr
9 years ago
committed by
Alexander Makarov
5 changed files with 28 additions and 6 deletions
@ -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) |
||||
|
||||
В данном разделе описаны подробности некоторых этапов обработки запроса. |
Loading…
Reference in new issue