定制 imatic/controller-bundle 二次开发

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

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

imatic/controller-bundle

最新稳定版本:v5.0.7

Composer 安装命令:

composer require imatic/controller-bundle

包简介

Bundle to write simple controllers

README 文档

README

Build Status License: MIT

ImaticControllerBundle

This bundle makes it easy to write simple controllers for all kinds of actions. It heavilly uses ImaticDataBundle. So you you should read it's documentation first if you didn't yet.

The bundle allows you to write simple actions in 2 forms

  • using fluent interface
<?php

use Imatic\Bundle\ControllerBundle\Controller\Api\ApiTrait;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\Routing\Annotation\Route;

/**
 * @Route("/user")
 */
class UserController extends Controller
{
    use ApiTrait;

    /**
     * @Route("", name="app_user_list", methods={"GET"})
     */
    public function listAction()
    {
        return $this
            ->listing(new UserListQuery())
            ->setTemplateName('AppImaticControllerBundle:Test:list.html.twig')
            ->getResponse();
    }
}
  • using yaml
imatic_controller:
    resources:
        app_user_list:
            config:
                route: { path: /user }
                entity: User
                query:
                    list: UserListQuery
                fields:
                    - { name: name, format: text }
                    - { age: age, format: number }
            actions:
                list: ~

Further reading

  • Visit our documentation to learn about all features of this bundle.

统计信息

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

GitHub 信息

  • Stars: 1
  • Watchers: 5
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-12-07

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固