Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b82ab2a

Browse files
committed
minor symfony#9661 Removed observer pattern, in favour of mediator (fabpot)
This PR was merged into the 2.2 branch. Discussion ---------- Removed observer pattern, in favour of mediator | Q | A | ------------- | --- | Doc fix? | yes | New docs? | no | Applies to | * | Fixed tickets | symfony#9344 I don't think this is the best tool to implement the observer pattern. I just have copied the sentence from: https://github.com/symfony/symfony-docs/edit/2.3/components/event_dispatcher/introduction.rst but maybe could be improved with something like: "Symfony Event Dispatcher is a tool that allows to make your projects truly extensible, facilitating the implementation of Mediator pattern and Publish subscribe pattern" [edit-1] I think this could be modified also here: https://github.com/symfony/symfony-marketing/edit/master/views/en/get_started/components.html.twig Commits ------- ab3e231 [EventDispatcher] tweaked README b9ad62e removed observer pattern, in favour of mediator
2 parents 05b1755 + ab3e231 commit b82ab2a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Symfony/Component/EventDispatcher/GenericEvent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate
2222
{
2323
/**
24-
* Observer pattern subject.
24+
* Event subject.
2525
*
2626
* @var mixed usually object or callable
2727
*/

src/Symfony/Component/EventDispatcher/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
EventDispatcher Component
22
=========================
33

4-
EventDispatcher implements a lightweight version of the Observer design
5-
pattern.
4+
The Symfony2 EventDispatcher component implements the Mediator pattern in a
5+
simple and effective way to make your projects truly extensible.
66

77
use Symfony\Component\EventDispatcher\EventDispatcher;
88
use Symfony\Component\EventDispatcher\Event;

0 commit comments

Comments
 (0)