FOSRestBundle功能包:使用指南

  • 原文出处:index.md

  • 原文作者:FriendsOfSymfony

  • 授权许可:创作共用协议

  • 翻译人员:FireHare

  • 校对人员:

  • 适用版本:FOSRestBundle 0.12.0

  • 文章状态:草译阶段

Getting Started With FOSRestBundle

Installation(安装)

Installation is a quick (I promise!) 1 step process:

安装只需一步(我发誓)

  1. Setting up the bundle(安装功能包)

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应用:

  • The view layer

  • 视图层

  • Listener support

  • 监听器支持

  • ExceptionController support

  • 异常控制器支持

  • Automatic route generation: single RESTful controller (for simple resources)

  • 自动路由生成:单个REST风格的控制器(针对单个资源)

  • Automatic route generation: multiple RESTful controllers (for resources with child/subresources)

  • 自动路由生成:多个REST风格的控制器(针对有着子资源的资源)

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


你可能感兴趣的:(Bundle,symfony2,使用指南,FOSRestBundle,功能包)