laravel-doctrine / fluent

Fluent mapping driver for Doctrine2
http://www.laraveldoctrine.org/docs/current/fluent
MIT License
43 stars 22 forks source link

Add support for entity listeners #45

Closed patrickbrouwers closed 7 years ago

patrickbrouwers commented 7 years ago

$builder->listen()->onFlush(TestEventListener::class, 'onFlush');

Supports all lifecycle events + defaults to the event name as method name, in case no method name is given.

$builder->listen()->onFlush(TestEventListener::class'); -> will call TestEventListener@onFlush