--
You received this message because you are subscribed to the Google Groups "PHP Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to php-fig+u...@googlegroups.com.
To post to this group, send email to php...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/afb79018-4226-4922-aeb6-0a000add585a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/9E49AC8D-9651-48B8-A5D8-5F0A3A89F48F%40gmail.com.
Hi all,
I'm really wondering what the real value of providing such a new common interface is. It really made sense for the PSR-3 LoggerInterface as logging is a feature we find in almost any web applications. But event management is not something you will find in many apps. Symfony, Doctrine and Zend Framework already have their own implementation that fit their needs. I could understand that this new PSR would make sense for people using both Symfony/Doctrine and ZF/Doctrine as those libraries have their own event management system. But apart from that, I don't see any points for making a common interface. Maybe there are I don't (fore)see yet...
If you start using one event management library for your application, are you suddenly going to decide to change it for another? Do you think mature frameworks like Symfony or Zend will want to update their codebase and change method signatures and calls everywhere? It will be a huge BC break.
In my opinion, it's the same debate than standardizing DI containers with a common interface. DI containers are very specific to frameworks at the beginning.
In the end, I'm not really in favor of it if there is no real reason or added value for a new common interface.
Hugo Hamon.
--
You received this message because you are subscribed to the Google Groups "PHP Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to php-fig+u...@googlegroups.com.
To post to this group, send email to php...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/afb79018-4226-4922-aeb6-0a000add585a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Hugo HAMON http://www.apprendre-php.com
--
--
You received this message because you are subscribed to the Google Groups "PHP Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to php-fig+u...@googlegroups.com.
To post to this group, send email to php...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/EE8D703E-5D16-471E-B1B1-67166103DA32%40gmail.com.
--
You received this message because you are subscribed to the Google Groups "PHP Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to php-fig+u...@googlegroups.com.
To post to this group, send email to php...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/154917c7-d4e0-4f09-898b-60178a95a78d%40googlegroups.com.
Is there already a PR for this suggestion? I honestly can't do much on the ML thread, but I'd gladly provide feedback on the diff itself.
As for the current state, I really like the idea of having a minimum common denominator of event managers!
The interfaces as they stand are a bit sloppy (mutability, mainly), but it's a good start :-)
--
You received this message because you are subscribed to the Google Groups "PHP Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to php-fig+u...@googlegroups.com.
To post to this group, send email to php...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/181b5caa-557b-419c-b361-b31cefdecb56%40googlegroups.com.
I can be either coordinator or sponsor for this one if you like.
You received this message because you are subscribed to a topic in the Google Groups "PHP Framework Interoperability Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/php-fig/-EJOStgxAwY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to php-fig+u...@googlegroups.com.
To post to this group, send email to php...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/CAAqcDMiTYZYPN-usGDmThk_SsAZrY4bKrmeWXv_PZ2YLt-M%2Big%40mail.gmail.com.
I would be happy to be a part of this either as well.I officially put my name in as a sponsor for this.Brian RettererStormpath PHP SDK
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/0a16afb6-dc25-4ed6-8f14-c0cc8ab0d911%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to php-fig+u...@googlegroups.com.
To post to this group, send email to php...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/570E658B.1090900%40garfieldtech.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/CABj1BaZ-m5xJ7vFRPODgTWFk6Ey48Q%3DRWyJ%3DkXxRJe63eF%3D%2BkQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/CAFp73XuR70pfT%3Dydg13QyJm8f-sjA9H6A6znFH%3Dn0E4UYz1n1w%40mail.gmail.com.
$someVar = $eventManager->dispatch(
'event.name',
[ // Event parameters
'my_arg' => 'asdasd',
'some_var' => '123123',
]
)->getParam('some_var');
class Event{ // immutable (getters only)}
class Hook{ // mutable (setParams, stopPropagation, ...)}
interface EventDispatcherInterface{ /** * @return void */ public function dispatch(Event $event);
/** * @return Hook */ public function hook(Hook $hook);}
interface EventSubscriberInterface{ /** * @return void */ public function attach(...);
/** * @return void */ public function detach(...);
/** * @return void */ public clearListeners();}
final class PreResponseHook extends Hook { ... }
final class ResponseWasSent extends Event { ... }
// You are able to modify response in handlers$hook = $this->eventDispatcher->hook(new PreResponseHook($response));$response = $hook->getResponse();$this->send($response);
// You are stating a fact, handlers can't do anything with response anymore$this->eventDispatcher->dispatch(new ResponseWasSent($response));
--
You received this message because you are subscribed to the Google Groups "PHP Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to php-fig+u...@googlegroups.com.
To post to this group, send email to php...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/19b06d9c-8ced-4d15-b0c2-5320a3665aa9%40googlegroups.com.
namespace Psr\EventManager; /** * Representation of an event */ interface EventInterface {
/** * Indicate whether or not to stop propagating this event * * @param bool $flag */ public function stopPropagation($flag); /** * Has this event indicated event propagation should stop? * * @return bool */ public function isPropagationStopped(); }
```
I use something very similar in my own event system I developed just with a little different names for methods etc.
PHP Event Mediator
I can be either coordinator or sponsor for this one if you like.
On Mar 9, 2016 23:38, "Michael Cullum" <m...@michaelcullum.com> wrote:Should someone wish to pick this up as Editor (An Editor doesn't have to be a project representative) and they can find a coordinator and sponsor (two voting members) to support the application then this could certainly head towards an entrance vote.--Michael COn 9 March 2016 at 21:07, Javier Aguilar <mjo...@gmail.com> wrote:Hi all, is the PSR for Events still being considered (here or in another thread) ?
I find it as essential as PSR-7, IMO.ThanksJavier A.
--
You received this message because you are subscribed to the Google Groups "PHP Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to php-fig+u...@googlegroups.com.
To post to this group, send email to php...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/181b5caa-557b-419c-b361-b31cefdecb56%40googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "PHP Framework Interoperability Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/php-fig/-EJOStgxAwY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to php-fig+u...@googlegroups.com.
To post to this group, send email to php...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/CAAqcDMiTYZYPN-usGDmThk_SsAZrY4bKrmeWXv_PZ2YLt-M%2Big%40mail.gmail.com.
--
You received this message because you are subscribed to a topic in the Google Groups "PHP Framework Interoperability Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/php-fig/-EJOStgxAwY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to php-fig+u...@googlegroups.com.
To post to this group, send email to php...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/05d1ed4d-6670-4270-b10f-5e17655bb75b%40googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "PHP Framework Interoperability Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/php-fig/-EJOStgxAwY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to php-fig+unsubscribe@googlegroups.com.
To post to this group, send email to php...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/c4ccbc90-7358-42a3-905b-097b0da7d0a7%40googlegroups.com.
You received this message because you are subscribed to the Google Groups "PHP Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to php-fig+u...@googlegroups.com.
To post to this group, send email to php...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/CAP9GSfWYk0zabs9GOKUGpMWb3_vNvaGnDO8NxPp_0kyATqOYVw%40mail.gmail.com.