smartgecko / governor-bundle
Symfony 为 Governor 框架提供的 Bundle
dev-master
2015-12-21 19:33 UTC
Requires
- php: >=5.5
- ocramius/proxy-manager: 1.0.x
- smartgecko/governor-framework: dev-master
- symfony/proxy-manager-bridge: >=2.4
Requires (Dev)
- doctrine/annotations: 1.2.3
- phake/phake: 1.*
- phpunit/phpunit: 4.2.*
- symfony/console: >=2.5
- symfony/finder: ~2.5
- symfony/framework-bundle: >=2.5
This package is not auto-updated.
Last update: 2024-09-14 17:31:56 UTC
README
Symfony 2 为 Governor 框架提供的 Bundle。
配置参考
工作单元工厂
governor.uow_factory.defaultgovernor.uow_factory.debug
调试 UOW 使用 Symfony Stopwatch 组件向分析器时间线发送数据。
注解读取器
类型
简单file_cache
参数
file_cache 注解读取器接受以下参数
debug: 布尔值path: 字符串
AMQP
要配置 AMQP 终端,请向 governor_framework.terminals.amqp 部分添加条目。该 Bundle 将在容器中创建一个名为 governor.terminal.amqp.%name% 的服务。
命令总线
要配置命令总线,请向 governor_framework.command_buses 部分添加条目。必须配置一个默认命令总线名为 default。
class: 字符串registry: 字符串dispatch_interceptors: 数组handler_interceptors: 数组
事件总线
示例配置
governor_framework:
uow_factory: governor.uow_factory.debug
annotation_reader:
type: file_cache
parameters:
debug: %kernel.debug%
path: "%kernel.cache_dir%/governor"
terminals:
amqp:
default:
host: %amqp_host%
port: %amqp_port%
user: %amqp_user%
password: %amqp_password%
vhost: %amqp_vhost%
command_buses:
default:
class: Governor\Framework\CommandHandling\SimpleCommandBus
registry: governor.command_bus_registry.in_memory
dispatch_interceptors: [governor.interceptor.validator]
handler_interceptors: [domain.governor.interceptor.audit]
event_buses:
default:
class: Governor\Framework\EventHandling\SimpleEventBus
registry: governor.event_bus_registry.in_memory
terminals: [governor.terminal.amqp.default]
command_gateways:
default:
class: Governor\Framework\CommandHandling\Gateway\DefaultCommandGateway
command_bus: default
lock_manager: "null"
command_target_resolver: annotation
order_resolver: annotation
aggregates:
first:
class: My\Project\FirstAggregate
repository: hybrid
handler: true
another:
class: My\Project\AnotherAggregate
repository: hybrid
handler: true
event_store:
type: orm
parameters:
entity_manager: governor_entity_manager
serializer: jms
saga_repository:
type: orm
parameters:
entity_manager: governor_entity_manager
saga_manager:
type: annotation
saga_locations: ["%kernel.root_dir%/../src/SmartGecko/Domain/*/Saga"]