# Yii 2.0 权威指南

> Table of contents of the guide: getting started, application structure, requests, key concepts, databases, forms, output, security, caching, REST and testing.

本教程的发布遵循 [Yii 文档使用许可](https://www.yiiframework.com/doc/terms/)。

版权所有。

2014 (c) Yii Software LLC。

## 介绍（Introduction）

- [关于 Yii（About Yii）](/docs/zh-cn/guide/intro-yii/index.md)
- [从 Yii 1.1 升级（Upgrading from Version 1.1）](/docs/zh-cn/guide/intro-upgrade-from-v1/index.md)

## 入门（Getting Started）

- [你需要了解什么（What do you need to know）](/docs/zh-cn/guide/start-prerequisites/index.md)
- [安装 Yii（Installing Yii）](/docs/zh-cn/guide/start-installation/index.md)
- [运行应用（Running Applications）](/docs/zh-cn/guide/start-workflow/index.md)
- [第一次问候（Saying Hello）](/docs/zh-cn/guide/start-hello/index.md)
- [使用 Forms（Working with Forms）](/docs/zh-cn/guide/start-forms/index.md)
- [玩转 Databases（Working with Databases）](/docs/zh-cn/guide/start-databases/index.md)
- [用 Gii 生成代码（Generating Code with Gii）](/docs/zh-cn/guide/start-gii/index.md)
- [更上一层楼（Looking Ahead）](/docs/zh-cn/guide/start-looking-ahead/index.md)

## 应用结构（Application Structure）

- [结构概述（Overview）](/docs/zh-cn/guide/structure-overview/index.md)
- [入口脚本（Entry Scripts）](/docs/zh-cn/guide/structure-entry-scripts/index.md)
- [应用（Applications）](/docs/zh-cn/guide/structure-applications/index.md)
- [应用组件（Application Components）](/docs/zh-cn/guide/structure-application-components/index.md)
- [控制器（Controllers）](/docs/zh-cn/guide/structure-controllers/index.md)
- [模型（Models）](/docs/zh-cn/guide/structure-models/index.md)
- [视图（Views）](/docs/zh-cn/guide/structure-views/index.md)
- [模块（Modules）](/docs/zh-cn/guide/structure-modules/index.md)
- [过滤器（Filters）](/docs/zh-cn/guide/structure-filters/index.md)
- [小部件（Widgets）](/docs/zh-cn/guide/structure-widgets/index.md)
- [前端资源（Assets）](/docs/zh-cn/guide/structure-assets/index.md)
- [扩展（Extensions）](/docs/zh-cn/guide/structure-extensions/index.md)

## 请求处理（Handling Requests）

- [运行概述（Overview）](/docs/zh-cn/guide/runtime-overview/index.md)
- [引导（Bootstrapping）](/docs/zh-cn/guide/runtime-bootstrapping/index.md)
- [路由引导与创建 URL（Routing and URL Creation）](/docs/zh-cn/guide/runtime-routing/index.md)
- [请求（Requests）](/docs/zh-cn/guide/runtime-requests/index.md)
- [响应（Responses）](/docs/zh-cn/guide/runtime-responses/index.md)
- [Sessions and Cookies](/docs/zh-cn/guide/runtime-sessions-cookies/index.md)
- [错误处理（Handling Errors）](/docs/zh-cn/guide/runtime-handling-errors/index.md)
- [日志（Logging）](/docs/zh-cn/guide/runtime-logging/index.md)

## 关键概念（Key Concepts）

- [组件（Components）](/docs/zh-cn/guide/concept-components/index.md)
- [属性（Properties）](/docs/zh-cn/guide/concept-properties/index.md)
- [事件（Events）](/docs/zh-cn/guide/concept-events/index.md)
- [行为（Behaviors）](/docs/zh-cn/guide/concept-behaviors/index.md)
- [配置（Configurations）](/docs/zh-cn/guide/concept-configurations/index.md)
- [别名（Aliases）](/docs/zh-cn/guide/concept-aliases/index.md)
- [类自动加载（Class Autoloading）](/docs/zh-cn/guide/concept-autoloading/index.md)
- [服务定位器（Service Locator）](/docs/zh-cn/guide/concept-service-locator/index.md)
- [依赖注入容器（Dependency Injection Container）](/docs/zh-cn/guide/concept-di-container/index.md)

## 配合数据库工作（Working with Databases）

- [数据库访问（Data Access Objects）](/docs/zh-cn/guide/db-dao/index.md): 数据库连接、基本查询、事务和模式操作
- [查询生成器（Query Builder）](/docs/zh-cn/guide/db-query-builder/index.md): 使用简单抽象层查询数据库
- [活动记录（Active Record）](/docs/zh-cn/guide/db-active-record/index.md): 活动记录对象关系映射（ORM），检索和操作记录、定义关联关系
- [数据库迁移（Migrations）](/docs/zh-cn/guide/db-migrations/index.md): 在团体开发中对你的数据库使用版本控制
- [Sphinx](https://www.yiiframework.com/extension/yiisoft/yii2-sphinx/doc/guide)
- [Redis（yii2-redis）](https://www.yiiframework.com/extension/yiisoft/yii2-redis/doc/guide/2.0/zh-cn): yii2-redis 扩展详解
- [MongoDB](https://www.yiiframework.com/extension/yiisoft/yii2-mongodb/doc/guide)
- [ElasticSearch](https://www.yiiframework.com/extension/yiisoft/yii2-elasticsearch/doc/guide)

## 接收用户数据（Getting Data from Users）

- [创建表单（Creating Forms）](/docs/zh-cn/guide/input-forms/index.md)
- [输入验证（Validating Input）](/docs/zh-cn/guide/input-validation/index.md)
- [文件上传（Uploading Files）](/docs/zh-cn/guide/input-file-upload/index.md)
- [收集列表输入（Collecting Tabular Input）](/docs/zh-cn/guide/input-tabular-input/index.md)
- [多模型同时输入（Getting Data for Multiple Models）](/docs/zh-cn/guide/input-multiple-models/index.md)
- [在客户端扩展 ActiveForm（Extending ActiveForm on the Client Side）](/docs/zh-cn/guide/input-form-javascript/index.md)

## 显示数据（Displaying Data）

- [格式化输出数据（Data Formatting）](/docs/zh-cn/guide/output-formatting/index.md)
- [分页（Pagination）](/docs/zh-cn/guide/output-pagination/index.md)
- [排序（Sorting）](/docs/zh-cn/guide/output-sorting/index.md)
- [数据提供器（Data Providers）](/docs/zh-cn/guide/output-data-providers/index.md)
- [数据小部件（Data Widgets）](/docs/zh-cn/guide/output-data-widgets/index.md)
- [操作客户端脚本（Working with Client Scripts）](/docs/zh-cn/guide/output-client-scripts/index.md)
- [主题（Theming）](/docs/zh-cn/guide/output-theming/index.md)

## 安全（Security）

- [概述（Overview）](/docs/zh-cn/guide/security-overview/index.md)
- [认证（Authentication）](/docs/zh-cn/guide/security-authentication/index.md)
- [授权（Authorization）](/docs/zh-cn/guide/security-authorization/index.md)
- [处理密码（Working with Passwords）](/docs/zh-cn/guide/security-passwords/index.md)
- [加密（Cryptography）](/docs/zh-cn/guide/security-cryptography/index.md)
- [客户端认证（Auth Clients）](https://github.com/yiisoft/yii2-authclient/blob/master/docs/guide-zh-CN/README.md)
- [安全领域的最佳实践（Best Practices）](/docs/zh-cn/guide/security-best-practices/index.md)

## 缓存（Caching）

- [概述（Overview）](/docs/zh-cn/guide/caching-overview/index.md)
- [数据缓存（Data Caching）](/docs/zh-cn/guide/caching-data/index.md)
- [片段缓存（Fragment Caching）](/docs/zh-cn/guide/caching-fragment/index.md)
- [页面缓存（Page Caching）](/docs/zh-cn/guide/caching-page/index.md)
- [HTTP 缓存（HTTP Caching）](/docs/zh-cn/guide/caching-http/index.md)

## RESTful Web 服务（RESTful Web Services）

- [快速入门（Quick Start）](/docs/zh-cn/guide/rest-quick-start/index.md)
- [资源（Resources）](/docs/zh-cn/guide/rest-resources/index.md)
- [控制器（Controllers）](/docs/zh-cn/guide/rest-controllers/index.md)
- [路由（Routing）](/docs/zh-cn/guide/rest-routing/index.md)
- [格式化响应（Response Formatting）](/docs/zh-cn/guide/rest-response-formatting/index.md)
- [授权验证（Authentication）](/docs/zh-cn/guide/rest-authentication/index.md)
- [速率限制（Rate Limiting）](/docs/zh-cn/guide/rest-rate-limiting/index.md)
- [版本化（Versioning）](/docs/zh-cn/guide/rest-versioning/index.md)
- [错误处理（Error Handling）](/docs/zh-cn/guide/rest-error-handling/index.md)

## 开发工具（Development Tools）

- [调试工具栏和调试器（Debug Toolbar and Debugger）](https://github.com/yiisoft/yii2-debug/blob/master/docs/guide-zh-CN/README.md)
- [使用 Gii 生成代码（Generating Code using Gii）](https://github.com/yiisoft/yii2-gii/blob/master/docs/guide-zh-CN/README.md)
- [生成 API 文档（Generating API Documentation）](https://github.com/yiisoft/yii2-apidoc)

## 测试（Testing）

- [概述（Overview）](/docs/zh-cn/guide/test-overview/index.md)
- [搭建测试环境（Testing environment setup）](/docs/zh-cn/guide/test-environment-setup/index.md)
- [单元测试（Unit Tests）](/docs/zh-cn/guide/test-unit/index.md)
- [功能测试（Functional Tests）](/docs/zh-cn/guide/test-functional/index.md)
- [验收测试（Acceptance Tests）](/docs/zh-cn/guide/test-acceptance/index.md)
- [测试夹具（Fixtures）](/docs/zh-cn/guide/test-fixtures/index.md)

## 高级专题（Special Topics）

- [高级应用模版（Advanced Project Template）](https://github.com/yiisoft/yii2-app-advanced/blob/master/docs/guide-zh-CN/README.md)
- [从头构建自定义模版（Building Application from Scratch）](/docs/zh-cn/guide/tutorial-start-from-scratch/index.md)
- [控制台命令（Console Commands）](/docs/zh-cn/guide/tutorial-console/index.md)
- [核心验证器（Core Validators）](/docs/zh-cn/guide/tutorial-core-validators/index.md)
- [Docker](/docs/zh-cn/guide/tutorial-docker/index.md)
- [国际化（Internationalization）](/docs/zh-cn/guide/tutorial-i18n/index.md)
- [收发邮件（Mailing）](/docs/zh-cn/guide/tutorial-mailing/index.md)
- [性能优化（Performance Tuning）](/docs/zh-cn/guide/tutorial-performance-tuning/index.md)
- [共享主机环境（Shared Hosting Environment）](/docs/zh-cn/guide/tutorial-shared-hosting/index.md)
- [模板引擎（Template Engines）](/docs/zh-cn/guide/tutorial-template-engines/index.md)
- [集成第三方代码（Working with Third-Party Code）](/docs/zh-cn/guide/tutorial-yii-integration/index.md)
- [使用 Yii 作为微框架（Using Yii as a micro framework）](/docs/zh-cn/guide/tutorial-yii-as-micro-framework/index.md)

## 小部件（Widgets）

- [GridView](https://www.yiiframework.com/doc-2.0/yii-grid-gridview.html)
- [ListView](https://www.yiiframework.com/doc-2.0/yii-widgets-listview.html)
- [DetailView](https://www.yiiframework.com/doc-2.0/yii-widgets-detailview.html)
- [ActiveForm](https://www.yiiframework.com/doc-2.0/guide-input-forms.html#activerecord-based-forms-activeform)
- [Pjax](https://www.yiiframework.com/doc-2.0/yii-widgets-pjax.html)
- [Menu](https://www.yiiframework.com/doc-2.0/yii-widgets-menu.html)
- [LinkPager](https://www.yiiframework.com/doc-2.0/yii-widgets-linkpager.html)
- [LinkSorter](https://www.yiiframework.com/doc-2.0/yii-widgets-linksorter.html)
- [Bootstrap Widgets](https://github.com/yiisoft/yii2-bootstrap/blob/master/docs/guide-zh-CN/README.md)
- [jQuery UI Widgets](https://github.com/yiisoft/yii2-jui/blob/master/docs/guide-zh-CN/README.md)

## 助手类（Helpers）

- [助手一览（Overview）](/docs/zh-cn/guide/helper-overview/index.md)
- [Array 助手（ArrayHelper）](/docs/zh-cn/guide/helper-array/index.md)
- [Html 助手（Html）](/docs/zh-cn/guide/helper-html/index.md)
- [Url 助手（Url）](/docs/zh-cn/guide/helper-url/index.md)