定制 lynx-ripe/swix-em-config 二次开发

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

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

lynx-ripe/swix-em-config

Composer 安装命令:

composer require lynx-ripe/swix-em-config

包简介

Swix Event Manager configuration helper module. Allows to attach listeners and aggregates via application config

README 文档

README

Zend Framework 2 module which provides possibility to attach event listeners and aggregates to SharedEventManager via configuration.

Installation

Add this line to your composer require key: "swix/swix-em-config": "dev-master" and update Composer. Then enable SwixEmConfig module in your application config.

Important note

Event listeners can be attached only after loading of all modules (ModuleEvent::EVENT_LOAD_MODULES_POST)

Example

In your application or module config:

<?php
use Zend\Mvc\MvcEvent;

return [
    'service_manager' =>  [
        'invokables' => [
            'SomeAggregate' => 'SomeNamespaces\SomeAggregate',
            'BootstrapListener' => 'SomeNamespaces\BootstrapListener'
        ]
    ],
    'event_manager' => [
        'listeners' => [
            // This listener will be retrived via ServiceManager
            ['event' => MvcEvent::EVENT_BOOTSTRAP, 'listener' => 'BootstrapListener']
            // This listener will be created directly if its class exists
            ['event' => 'some_event', 'listener' => SomeNamespaces\WithoutSM\BootstrapListener::class]
        ],
        'aggregates' => [
            ['aggregate' => 'SomeAggregate']
        ]
    ]
]

统计信息

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

GitHub 信息

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

其他信息

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

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固