Skip to content

Commit

Permalink
minor #4398 A few small improvements to the EventDispatcher Component…
Browse files Browse the repository at this point in the history
… 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 1ce9dc5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions components/event_dispatcher/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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.

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 1ce9dc5

Please sign in to comment.