定制 mi/rest-extra-bundle 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

mi/rest-extra-bundle

最新稳定版本:3.0.5

Composer 安装命令:

composer require mi/rest-extra-bundle

包简介

Helper to avoid annotations with FOSRestBundle and SensioFrameworkExtraBundle

README 文档

README

Build Status Latest Stable Version Latest Unstable Version Total Downloads License

Overview

...

Installation

  1. Add this bundle to your project as a composer dependency:
composer require mi/rest-extra-bundle
  1. Add this bundle in your application kernel:

    // app/AppKernel.php
    public function registerBundles()
    {
        // ...
        $bundles[] = new \Mi\Bundle\RestExtraBundle\MiRestExtraBundle();
    
        return $bundles;
    }

Usage

ParamConverterListener

```yaml
#routing.yml
mi_rest_extra_create:
    ...
    defaults:
      ...
      _converters:
        note:
            name: note
            converter: fos_rest.request_body
            class: Mi\RestExtra\Core\Model\Note
```

ParamFetcherListener

```yaml
#routing.yml
mi_rest_extra_create:
    ...
    defaults:
      ...
      _params:
          startDate:
              strict: true
              nullable: false
```

ViewListener

```yaml
#routing.yml
mi_rest_extra_create:
    ...
    defaults:
      ...
      _view:
        serializerGroups: [list]
```

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

License

This library is under the MIT license.

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 4
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-09-08