willdurand / eventdispatcherbehavior Goto Github PK
View Code? Open in Web Editor NEWIntegrates the Symfony2 EventDispatcher component in your Model classes.
License: MIT License
Integrates the Symfony2 EventDispatcher component in your Model classes.
License: MIT License
In namespaced ActiveRecord classes the "implements EventDispatcherAwareModelInterface" part tries to find the class in the same namespace as the ActiveRecord class and throws a fatal error.
I use the BazingaPropelEventDispatcherBundle but i think this should be fixed in the behavior itself.
Proposed fixes would be to change the implements part to "implements \EventDispatcherAwareModelInterface" or to add "use \EventDispatcherAwareModelInterface"
kind regards
Hello @willdurand
I 've tested on my sf 2.3 project and configured a listener for a class.
BaseUser
classBut no listenered in the symfony EventDispatcher i do a var_dump of array_keys($this->listeners)
But have only
array (size=1)
0 => string 'kernel.request' (length=14)
Hi,
is there a way to fetch the current connection used by the function who dispatches the event in the listener/subscriber or is \Propel::getConnection(...) the way to go?
Otherwise i suggest to pass them as an argument to the GenericEvent
kind regards
Tschebel
Hi,
I'm using Propel 1.6 and working with a relation and I wanted to create a listener on when the relation is created or deleted. The listener works only when a relation is created because the object launches it's postInsert. However, the deletion is made by the *Query object which is not modified by the EventDispatcherBehaviour, so a PostDelete is empty. Could you point me to a way I can extend the Behaviour so it modifies also the query object? Or is there any better way to do what I want?
This is a feature request for adding consturction time event dispatch support propel.construct
.
One use case is to check whether the object has implemented ContainerAwareInterface
and inject the container.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.