manticora/rest-extra-bundle 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

manticora/rest-extra-bundle

Composer 安装命令:

composer require manticora/rest-extra-bundle

包简介

Utilities for Symfony Rest Services

README 文档

README

Build Status

Utilities for Symfony Rest Services

Usage

Router Expression Language Injection

Injecting the Router expression Language you can use the the custom Expression Language class in the routing conditions, this class contains the PHP version_compare function for versioning rest web services

    /**
     * @Get("notes", condition="compare(request.attributes.get('version'),'1', '<')")
     */
    public function cgetAction()
    {
        return $this->getRepository()->findAll();
    }

    /**
     * @Get("notes", condition="compare(request.attributes.get('version'),'1', '>=')")
     */
    public function cgetNewVersionAction()
    {
        echo 'new version';

        return $this->getRepository()->findAll();
    }

Installation

Download Packages

Add the following lines in your composer.json file:

{
    "require": {
        "manticora/rest-extra-bundle": "0.1"
    }
}

Now, run composer.phar to download the bundle:

$ php composer.phar install

Note: You can immediately start using it. The autoloading files have been generated by composer and already included to the app autoload file.

Step 2: Enable the bundle

Finally, enable the bundle in the kernel:

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
       new Manticora\RestExtraBundle\ManticoraRestExtraBundle(),
    );
}

TODO

  • Json Patch
  • Url Matcher rewrite
  • AbstractHalRepository
  • Hal Test Utility
  • JMS Serializer Group Strategy rewrite
  • Paginated Representation rewrite

License

RestExtraBundle is released under the MIT License. See the bundled LICENSE file for details.

统计信息

  • 总下载量: 22
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 8
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 7
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-05-05

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固