willdurand/propel-eventdispatcher-behavior
最新稳定版本:1.3.0
Composer 安装命令:
composer require willdurand/propel-eventdispatcher-behavior
包简介
Integrates the Symfony2 EventDispatcher component in your Model classes.
README 文档
README
Integrate the Symfony2 EventDispatcher component in your Model classes.
Installation
Requires this behavior in your composer.json:
{ "require": { "willdurand/propel-eventdispatcher-behavior": "dev-master" } }
Add the following line to your propel.ini or build.properties configuration
file:
propel.behavior.eventdispatcher.class = vendor.willdurand.propel-eventdispatcher-behavior.src.EventDispatcherBehavior
Note:
vendor.willdurand.propel-eventdispatcher-behavior.srcis the path of the behavior in dot-path notation.
Finally, adds this behavior to your schema.xml:
<database name="foo"> <table name="a-table"> <behavior name="event_dispatcher" /> </table> </database>
ActiveRecord API
This behavior adds a single method getEventDispatcher().
This method creates an instance of
EventDispatcher
per class.
Running tests
Install dependencies:
php composer.phar install --dev
Run the test suite:
phpunit
License
This behavior is released under the MIT License. See the bundled LICENSE file for details.
统计信息
- 总下载量: 30.89k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 19
- 点击次数: 0
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2012-06-25