actual very easy to convert a namespace to event name with '.'
$eventName = str_replace('\\', '.', __CLASS__);
Same basic idea I use to convert namespaces into directory path parts for
stuff.
On Friday, June 10, 2016 at 1:15:21 PM UTC-7, Daniel Plainview wrote:
>
> > The event name MUST only contain the characters `A-Z`, `a-z`, `0-9`,
> `_`, and '.'.
>
> This restriction makes impossible to make event names coinciding with
> class names, e.g. "Acme\Foo\BarWasFixed". I really like this approach,
> because it doesn't allow to make ugly generic events like "ProjectEvent".
> Dev is forced to make new class for every new event: ProjectWasStarted,
> ProjectWasLocked, ...
>
> > It is RECOMMENDED that words in event names be separated using '.' ex.
> 'foo.bar.baz.bat'
>
> Although I don't like approach with separated event name, I think it
> doesn't take into account namespaced events like
> "acme.project.was.started". Is it really better than
> "acme.project_was_started"?
>
> On Tuesday, June 7, 2016 at 7:17:55 PM UTC+3, Larry Garfield wrote:
>>
>> Greetings.
>>
>> The spec is still far too new and in flux for actual/real implementations
>> to exist; it's too early to try to build it into a for-reals product, as
>> it's likely to change considerably before it's finalized. Trial
>> implementations to see if it would actually work, however, are very much
>> encouraged.
>>
>> If you tried to implement it and ran into confusion, that's exactly the
>> sort of feedback we'd want to hear! What was confusing, why, what broke
>> when you tried it, etc?
>>
>> --Larry Garfield
>>
>> On 06/07/2016 01:05 AM, Haridarshan Gorana wrote:
>>
>> Hi,
>>
>> I was looking for actual/real implementation of this PSR 14 EventManager.
>> As we were thinking to implement this in our product. Does anyone can
>> suggest how to implement this.
>>
>> I've tried to implement the interfaces by own but m very much confused
>> with Event implementing EventInterface and EventManager implementing
>> EventManagerInterface.
>>
>>
>> On Monday, 21 July 2014 02:10:33 UTC+5:30, Chuck Reeves wrote:
>>>
>>> Back at PHPTek, @crell asked if there were any ideas out there for new
>>> FIG standards. I came up with the idea of having an Event Manager Interface
>>> through FIG.
>>>
>>> I took a look at Symfony, Zend Framework 2 and Doctrine to see how they
>>> work then started an early draft. I made mention of it on twitter and
>>> started getting some feedback. I figured I would start a conversation here
>>> to avoid the limitations of twitter and incorporate those ideas into the
>>> draft. Here is the link to what I came up with so far:
>>> <https://github.com/manchuck/fig-standards/blob/master/proposed/event-manager.md>
>>> https://github.com/manchuck/fig-standards/blob/master/proposed/
>>> event-manager.md
>>>
>>> The 1st reaction was with the use of getName. Symfony 3 is moving away
>>> from using it in favor of using objects. My initial thought for including
>>> getName in EventInterface, was to allow implementer to build an event using
>>> EventInterface and then pass that in to the EventManagerInterface::trigger
>>>
>>> I do not know of any other frameworks use an event manager out there. I
>>> would appreciate any feedback on my initial draft as well as insight into
>>> other frameworks out there that use events.
>>>
>>> Thanks
>>>
>> --
>> 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 [email protected].
>> To post to this group, send email to [email protected].
>> To view this discussion on the web visit
>> <https://groups.google.com/d/msgid/php-fig/19b06d9c-8ced-4d15-b0c2-5320a3665aa9%40googlegroups.com?utm_medium=email&utm_source=footer>
>> https://groups.google.com/d/msgid/php-fig/19b06d9c-8ced-4d15-b0c2-5320a3665aa9%40googlegroups.com
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>>
>>
--
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/php-fig/e9732e22-5f5d-4b1e-a42e-0be3c0210cf8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.