Symfony 组件
Symfony 组件提供开发网站时的常用到的功能。这些是 Symofny 全能框架的基石。 然而,这些组件可以单独使用,不需与框架一起使用,就如同它们无需依赖库一样。
Installation
使用 Composer 安装Symfony的任何组件到你的PHP项目:
$ composer require
Component List
| Component | Description | Code | Documentation |
|---|---|---|---|
| Asset | 管理URL生成和静态资源版本,比如CSS样式表,JavaScript文件和图片。 | Code | Documentation |
| BrowserKit | 模拟浏览器的功能。 | Code | - |
| ClassLoader | 如果类(Class)采用了某些标准的PHP规则,便会自动加载到项目内。 | Code | Documentation |
| Config | 帮助您找到、加载、混合、自动填充、验证设置数值。 | Code | Documentation |
| Console | E简化创建美观和可测试的命令行界面。 | Code | Documentation |
| CssSelector | 将 CSS 选择器转换为 XPath 语言。 | Code | Documentation |
| Debug | 提供工具来简化 PHP 代码的调试。 | Code | Documentation |
| DependencyInjection | 让您能够以统一的、集中的方式创建程序中的对象。 | Code | Documentation |
| DomCrawler | 简化 HTML 和 XML 文件内 DOM 的查找。 | Code | Documentation |
| EventDispatcher | 提供一款 观察者设计模式 (Observer design pattern) 的轻量代码。 | Code | Documentation |
| ExpressionLanguage | Provides an engine that can compile and evaluate expressions. | Code | Documentation |
| Filesystem | 提供文件系统的基本操作。 | Code | Documentation |
| Finder | 提供易懂的流畅界面 (fluent interface),来查找文件和文件夹。 | Code | Documentation |
| Form | 提供工具,以方便创建,处理和重用HTML表单。 | Code | Documentation |
| HttpFoundation | 为 HTTP 规格提供一个面向对象的界面。 | Code | Documentation |
| HttpKernel | 为创建灵活的、高速的、基于 HTTP 的框架提供基本元件。 | Code | Documentation |
| Icu | 包含ICU库的一个特定版本的数据。该组件在2014年10月废弃,使用国际组件代替。 | Code | - |
| Intl | 如果 intl 扩展不存在,此组件可提供相关的功能。 | Code | Documentation |
| Locale | 如果 intl 扩展不存在,此组件可提供相关的功能。此组件于版本 2.3 过时,请使用 Intl 组件。 | Code | Documentation |
| OptionsResolver | 用设置数组来帮助您配置对象。 | Code | Documentation |
| Process | 以子流程执行指令。 | Code | Documentation |
| PropertyAccess | 以存取简单字符串的方式来读取/储存对象或数组的数据。 | Code | Documentation |
| Routing | 将 HTTP 访问转换为一组设置变量。 | Code | Documentation |
| Security | 为建立复杂的授权系统提供设施。 | Code | Documentation |
| Serializer | 将对象转换为某种格式的数据(XML、JSON、Yaml……) 或反向转换。 | Code | Documentation |
| Stopwatch | 提供一种分析代码的功能。 | Code | Documentation |
| Templating | 提供工具制作任何种类的模板系统。 | Code | Documentation |
| Translation | 翻译组件工具 | Code | Documentation |
| Validator | 提供验证类的工具。 | Code | - |
| VarDumper | Provides mechanisms for walking through any arbitrary PHP variable. | Code | Documentation |
| Yaml | 加载和导出 YAML 文件。 | Code | Documentation |




