Getting Started With FOSRestBundle
Installation(安装)
Installation is a quick (I promise!) 1 step process:
安装只需一步(我发誓)
Bundle usage(功能包用法)
Before you start using the bundle it is advised you run a quick look over the 5 sections listed below.This bundle contains many features that are loosly coupled so you may or may not need to use all ofthem. This bundle is just a tool to help you in the job of creating a REST API with Symfony2.
在您开始使用功能包之前,建议您先快速浏览下列5部分内容。这个功能包有着许多松耦合的功能,您可能不需要使用所有的功能。它只是个帮助您在Symfony2中创建REST风格API的工具。
FOSRestBundle provides several tools to assist in building REST applications:
FOSRestBundle提供几个工具来帮助构建REST应用:
-
Automatic route generation: single RESTful controller (for simple resources)
-
Automatic route generation: multiple RESTful controllers (for resources with child/subresources)
Config reference(配置参考)
Check out the configuration reference for a reference on the available configuration options.
查看配置参考以参考可用的配置选项。
Example application(s)(应用示例)
The following bundles/applications use the FOSRestBundle and can be used as aguideline:
下列功能包/应用可以做为使用FOSRestBundle的示例:
-
The LiipHelloBundle provides several examples for the RestBundle:https://github.com/liip/LiipHelloBundle
-
LiipHelloBundle功能包提供了几种使用FOSRestBundle的示例:https://github.com/liip/LiipHelloBundle
-
There is also a fork of the Symfony2 Standard Edition that is configured toshow the LiipHelloBundle examples:https://github.com/liip-forks/symfony-standard/tree/techtalk
-
这里有一个Symfony2标准版的分支,来于展示LiipHelloBundle的配置示例:https://github.com/liip-forks/symfony-standard/tree/techtalk
-
The FOSCommentBundle uses FOSRestBundle for its api:https://github.com/FriendsOfSymfony/FOSCommentBundle
-
FOSCommentBundle功能包使用FOSRestBundle生成API:https://github.com/FriendsOfSymfony/FOSCommentBundle