Jelajahi Sumber

[EventDispatcher] tagged the guaranteed BC API

Fabien Potencier 14 tahun lalu
induk
melakukan
0f231c33e5

+ 10 - 0
src/Symfony/Component/EventDispatcher/EventDispatcher.php

@@ -35,6 +35,8 @@ namespace Symfony\Component\EventDispatcher;
  * @author  Roman Borschel <roman@code-factory.org>
  * @author  Bernhard Schussek <bschussek@gmail.com>
  * @author  Fabien Potencier <fabien@symfony.com>
+ *
+ * @api
  */
 class EventDispatcher implements EventDispatcherInterface
 {
@@ -43,6 +45,8 @@ class EventDispatcher implements EventDispatcherInterface
 
     /**
      * @see EventDispatcherInterface::dispatch
+     *
+     * @api
      */
     public function dispatch($eventName, Event $event = null)
     {
@@ -65,6 +69,8 @@ class EventDispatcher implements EventDispatcherInterface
 
     /**
      * @see EventDispatcherInterface::getListeners
+     *
+     * @api
      */
     public function getListeners($eventName = null)
     {
@@ -92,6 +98,8 @@ class EventDispatcher implements EventDispatcherInterface
 
     /**
      * @see EventDispatcherInterface::hasListeners
+     *
+     * @api
      */
     public function hasListeners($eventName = null)
     {
@@ -100,6 +108,8 @@ class EventDispatcher implements EventDispatcherInterface
 
     /**
      * @see EventDispatcherInterface::addListener
+     *
+     * @api
      */
     public function addListener($eventNames, $listener, $priority = 0)
     {

+ 10 - 0
src/Symfony/Component/EventDispatcher/EventDispatcherInterface.php

@@ -17,6 +17,8 @@ namespace Symfony\Component\EventDispatcher;
  * manager.
  *
  * @author Bernhard Schussek <bschussek@gmail.com>
+ *
+ * @api
  */
 interface EventDispatcherInterface
 {
@@ -28,6 +30,8 @@ interface EventDispatcherInterface
      *                          invoked on listeners.
      * @param Event $event The event to pass to the event handlers/listeners.
      *                     If not supplied, an empty Event instance is created.
+     *
+     * @api
      */
     function dispatch($eventName, Event $event = null);
 
@@ -39,6 +43,8 @@ interface EventDispatcherInterface
      * @param integer $priority The higher this value, the earlier an event
      *                          listener will be triggered in the chain.
      *                          Defaults to 0.
+     *
+     * @api
      */
     function addListener($eventNames, $listener, $priority = 0);
 
@@ -75,6 +81,8 @@ interface EventDispatcherInterface
      *
      * @return array The event listeners for the specified event, or all event
      *               listeners by event name.
+     *
+     * @api
      */
     function getListeners($eventName = null);
 
@@ -85,6 +93,8 @@ interface EventDispatcherInterface
      *
      * @return Boolean TRUE if the specified event has any listeners, FALSE
      *                 otherwise.
+     *
+     * @api
      */
     function hasListeners($eventName = null);
 }