Permalink
Browse files

minor #4398 A few small improvements to the EventDispatcher Component…

… docs (GeertDD)

This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #4398).

Discussion
----------

A few small improvements to the EventDispatcher Component docs

Commits
-------

43e3847 A few small improvements to the EventDispatcher Component docs
  • Loading branch information...
weaverryan committed Nov 5, 2014
2 parents 0e80aba + 43e3847 commit 1ce9dc5bfbdedacd093f35282327f577a34bdb45
Showing with 3 additions and 3 deletions.
  1. +3 −3 components/event_dispatcher/introduction.rst
@@ -134,7 +134,7 @@ Connecting Listeners
To take advantage of an existing event, you need to connect a listener to the
dispatcher so that it can be notified when the event is dispatched. A call to
the dispatcher ``addListener()`` method associates any valid PHP callable to
the dispatcher's ``addListener()`` method associates any valid PHP callable to
an event::
$listener = new AcmeListener();
@@ -158,7 +158,7 @@ The ``addListener()`` method takes up to three arguments:
A `PHP callable`_ is a PHP variable that can be used by the
``call_user_func()`` function and returns ``true`` when passed to the
``is_callable()`` function. It can be a ``\Closure`` instance, an object
implementing an __invoke method (which is what closures are in fact),
implementing an ``__invoke`` method (which is what closures are in fact),
a string representing a function, or an array representing an object
method or a class method.
@@ -583,7 +583,7 @@ Dispatcher Shortcuts
The :method:`EventDispatcher::dispatch <Symfony\\Component\\EventDispatcher\\EventDispatcher::dispatch>`
method always returns an :class:`Symfony\\Component\\EventDispatcher\\Event`
object. This allows for various shortcuts. For example if one does not need
object. This allows for various shortcuts. For example, if one does not need
a custom event object, one can simply rely on a plain
:class:`Symfony\\Component\\EventDispatcher\\Event` object. You do not even need
to pass this to the dispatcher as it will create one by default unless you

0 comments on commit 1ce9dc5

Please sign in to comment.