GithubHelp home page GithubHelp logo

eventdispatcherbehavior's People

Contributors

ienzam avatar k-phoen avatar simitter avatar willdurand avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

eventdispatcherbehavior's Issues

EventDispatcherAwareModelInterface not found in namespaced ActiveRecord classes

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

Is it working on sf 2.3 ?

Hello @willdurand

I 've tested on my sf 2.3 project and configured a listener for a class.

  • I see well the service "bazinga.propel_event_dispatcher.dispatcher.fos_userbundle_propel_user"
  • The behavior in BaseUser class

But 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)

Passing current connection to the listener/subscriber

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

'post_delete' not launched when deleting item from a 1:n relation

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?

Dispatch an event for model object construction

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.