screeper-project / jsonapi-bundle
Symfony 2 的 JsonApi 支持
dev-master
2014-07-31 12:21 UTC
Requires
- php: >=5.3.0
- doctrine/doctrine-bundle: *
- screeper-project/server-bundle: dev-master
- symfony/framework-bundle: >=2.1
- twig/twig: *
This package is not auto-updated.
Last update: 2024-09-24 07:06:52 UTC
README
开发中
JsonApi 扩展包在 Symfony 2 中添加了对 JsonApi(alecgorge 的插件)的支持。
JsonApi 的 github: https://github.com/alecgorge/jsonapi
JsonApi 的网页:不可用
安装
在您的 composer.json 中添加
"graille-labs/screeper-jsonapi-bundle": "dev-master"
配置
您必须在 ServerBundle 中配置服务器
ServerBundle 页面:https://github.com/graille/ServerBundle
使用方法
为了使用,您必须调用服务
$api = $this->container->get('screeper.json_api.services.api')->getApi("servername");
之后,您就可以正常使用 API。如果 "servername" 为空,则使用默认服务器(更多信息,请访问 ServerBundle 页面)。