helthe / cqrs-bundle
Helthe CQRS bundle for Symfony 2
dev-master / 1.0.x-dev
2014-09-16 21:45 UTC
Requires
- php: >=5.3.3
- helthe/cqrs: dev-master
- symfony/framework-bundle: ~2.3
This package is auto-updated.
Last update: 2024-08-29 04:08:59 UTC
README
Helthe CQRS Bundle 将 Helthe CQRS 组件与您的 Symfony2 应用程序集成。
安装
步骤 1:在 Composer 中添加包需求
手动
在您的 composer.json
文件中添加以下内容
{ "require": { // ... "helthe/cqrs-bundle": "dev-master" } }
使用命令行
$ composer require 'helthe/cqrs-bundle=dev-master'
步骤 2:在内核中注册捆绑包
<?php // app/AppKernel.php public function registerBundles() { $bundles = array( // ... new Helthe\Bundle\CQRSBundle\HeltheCQRSBundle(), ); }
用法
如果命令处理程序服务带有 helthe_cqrs.command_handler
标签,该捆绑包会自动注册命令处理程序服务。此标签需要一个代表命令名称的 command
属性。命令名称需要是处理程序可以执行的命令类的完整类名。
<service id="acme_demo.command_handler.your_handler_name" class="Acme\DemoBundle\CommandHandler\AcmeCommandHandler"> <tag name="helthe_cqrs.command_handler" command="Acme\DemoBundle\Command\AcmeCommand" /> </service>
错误
对于错误或功能请求,请 创建一个问题。