Skip to content

Commit

Permalink
Uppercase all class constants
Browse files Browse the repository at this point in the history
  • Loading branch information
Baachi committed May 11, 2012
1 parent 933d4b9 commit 810c732
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions components/event_dispatcher.rst
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ that serves to define and document your event:
*
* @var string
*/
const onStoreOrder = 'store.order';
const STORE_ORDER = 'store.order';
}
Notice that this class doesn't actually *do* anything. The purpose of the
Expand Down Expand Up @@ -314,7 +314,7 @@ listener of that event:
// create the FilterOrderEvent and dispatch it
$event = new FilterOrderEvent($order);
$dispatcher->dispatch(StoreEvents::onStoreOrder, $event);
$dispatcher->dispatch(StoreEvents::STORE_ORDER, $event);
Notice that the special ``FilterOrderEvent`` object is created and passed to
the ``dispatch`` method. Now, any listener to the ``store.order`` event will
Expand All @@ -323,7 +323,7 @@ the ``getOrder`` method:

.. code-block:: php
// some listener class that's been registered for onStoreOrder
// some listener class that's been registered for "STORE_ORDER" event
use Acme\StoreBundle\Event\FilterOrderEvent;
public function onStoreOrder(FilterOrderEvent $event)
Expand Down

0 comments on commit 810c732

Please sign in to comment.