Permalink
Browse files

[zen-27] Renamed interfaces in Zend\EventManager

  • Loading branch information...
1 parent 52120c3 commit a9608b2ac31557b5059c6dedaac5a3973be276c3 @prolic prolic committed Apr 21, 2012
Showing with 196 additions and 193 deletions.
  1. +5 −5 library/Zend/Cache/Storage/Plugin/ClearByFactor.php
  2. +5 −5 library/Zend/Cache/Storage/Plugin/ExceptionHandler.php
  3. +5 −5 library/Zend/Cache/Storage/Plugin/IgnoreUserAbort.php
  4. +5 −5 library/Zend/Cache/Storage/Plugin/OptimizeByFactor.php
  5. +5 −5 library/Zend/Cache/Storage/Plugin/Serializer.php
  6. +1 −1 library/Zend/EventManager/Event.php
  7. +2 −2 library/Zend/EventManager/{EventDescription.php → EventInterface.php}
  8. +17 −17 library/Zend/EventManager/EventManager.php
  9. +2 −2 library/Zend/EventManager/EventManagerAware.php
  10. +1 −1 library/Zend/EventManager/{EventCollection.php → EventManagerInterface.php}
  11. +2 −2 library/Zend/EventManager/{Exception.php → Exception/ExceptionInterface.php}
  12. +1 −3 library/Zend/EventManager/Exception/InvalidArgumentException.php
  13. +3 −3 library/Zend/EventManager/FilterChain.php
  14. +1 −1 library/Zend/EventManager/{Filter.php → FilterInterface.php}
  15. +3 −3 library/Zend/EventManager/GlobalEventManager.php
  16. +4 −4 library/Zend/EventManager/ListenerAggregate.php
  17. +5 −5 library/Zend/EventManager/ProvidesEvents.php
  18. +1 −1 library/Zend/EventManager/SharedEventManager.php
  19. +5 −5 library/Zend/EventManager/{SharedEventCollectionAware.php → SharedEventManagerAwareInterface.php}
  20. +1 −1 library/Zend/EventManager/{SharedEventCollection.php → SharedEventManagerInterface.php}
  21. +5 −5 library/Zend/Module/Listener/ConfigListener.php
  22. +5 −5 library/Zend/Module/Listener/DefaultListenerAggregate.php
  23. +5 −5 library/Zend/Module/Listener/LocatorRegistrationListener.php
  24. +9 −9 library/Zend/Module/Manager.php
  25. +6 −6 library/Zend/Mvc/Application.php
  26. +5 −5 library/Zend/Mvc/Bootstrap.php
  27. +6 −6 library/Zend/Mvc/Controller/ActionController.php
  28. +5 −5 library/Zend/Mvc/Controller/RestfulController.php
  29. +1 −1 library/Zend/Mvc/InjectApplicationEvent.php
  30. +1 −1 library/Zend/Mvc/View/CreateViewModelListener.php
  31. +5 −5 library/Zend/Mvc/View/DefaultRenderingStrategy.php
  32. +5 −5 library/Zend/Mvc/View/ExceptionStrategy.php
  33. +2 −2 library/Zend/Mvc/View/InjectTemplateListener.php
  34. +2 −2 library/Zend/Mvc/View/InjectViewModelListener.php
  35. +5 −5 library/Zend/Mvc/View/RouteNotFoundStrategy.php
  36. +1 −1 library/Zend/Session/Container.php
  37. +2 −2 library/Zend/Session/Manager.php
  38. +4 −4 library/Zend/Session/SessionManager.php
  39. +5 −5 library/Zend/View/Strategy/FeedStrategy.php
  40. +5 −5 library/Zend/View/Strategy/JsonStrategy.php
  41. +5 −5 library/Zend/View/Strategy/PhpRendererStrategy.php
  42. +6 −6 library/Zend/View/View.php
  43. +3 −3 tests/Zend/Cache/Storage/TestAsset/MockPlugin.php
  44. +8 −8 tests/Zend/EventManager/EventManagerTest.php
  45. +5 −0 tests/Zend/EventManager/FilterChainTest.php
  46. +2 −2 tests/Zend/EventManager/TestAsset/ClassWithEvents.php
  47. +3 −3 tests/Zend/EventManager/TestAsset/MockAggregate.php
  48. +2 −2 tests/Zend/EventManager/TestAsset/StaticEventsMock.php
  49. +1 −1 tests/Zend/Mvc/ApplicationTest.php
  50. +1 −1 tests/Zend/Mvc/Controller/TestAsset/UnlocatableEventfulController.php
  51. +2 −2 tests/Zend/Session/TestAsset/TestManager.php
@@ -22,7 +22,7 @@
namespace Zend\Cache\Storage\Plugin;
use Traversable,
- Zend\EventManager\EventCollection,
+ Zend\EventManager\EventManagerInterface,
Zend\Cache\Exception,
Zend\Cache\Storage\Adapter,
Zend\Cache\Storage\PostEvent;
@@ -46,11 +46,11 @@ class ClearByFactor extends AbstractPlugin
/**
* Attach
*
- * @param EventCollection $eventCollection
+ * @param EventManagerInterface $eventCollection
* @return ClearByFactor
* @throws Exception\LogicException
*/
- public function attach(EventCollection $eventCollection)
+ public function attach(EventManagerInterface $eventCollection)
{
$index = spl_object_hash($eventCollection);
if (isset($this->handles[$index])) {
@@ -71,11 +71,11 @@ public function attach(EventCollection $eventCollection)
/**
* Detach
*
- * @param EventCollection $eventCollection
+ * @param EventManagerInterface $eventCollection
* @return ClearByFactor
* @throws Exception\LogicException
*/
- public function detach(EventCollection $eventCollection)
+ public function detach(EventManagerInterface $eventCollection)
{
$index = spl_object_hash($eventCollection);
if (!isset($this->handles[$index])) {
@@ -24,7 +24,7 @@
use Traversable,
Zend\Cache\Exception,
Zend\Cache\Storage\ExceptionEvent,
- Zend\EventManager\EventCollection;
+ Zend\EventManager\EventManagerInterface;
/**
* @category Zend
@@ -44,11 +44,11 @@ class ExceptionHandler extends AbstractPlugin
/**
* Attach
*
- * @param EventCollection $eventCollection
+ * @param EventManagerInterface $eventCollection
* @return ExceptionHandler
* @throws Exception\LogicException
*/
- public function attach(EventCollection $eventCollection)
+ public function attach(EventManagerInterface $eventCollection)
{
$index = spl_object_hash($eventCollection);
if (isset($this->handles[$index])) {
@@ -115,11 +115,11 @@ public function attach(EventCollection $eventCollection)
/**
* Detach
*
- * @param EventCollection $eventCollection
+ * @param EventManagerInterface $eventCollection
* @return ExceptionHandler
* @throws Exception\LogicException
*/
- public function detach(EventCollection $eventCollection)
+ public function detach(EventManagerInterface $eventCollection)
{
$index = spl_object_hash($eventCollection);
if (!isset($this->handles[$index])) {
@@ -24,7 +24,7 @@
use Zend\Cache\Exception,
Zend\Cache\Storage\Adapter,
Zend\Cache\Storage\Event,
- Zend\EventManager\EventCollection;
+ Zend\EventManager\EventManagerInterface;
/**
* @category Zend
@@ -52,11 +52,11 @@ class IgnoreUserAbort extends AbstractPlugin
/**
* Attach
*
- * @param EventCollection $eventCollection
+ * @param EventManagerInterface $eventCollection
* @return Serializer
* @throws Exception\LogicException
*/
- public function attach(EventCollection $events)
+ public function attach(EventManagerInterface $events)
{
$index = spl_object_hash($events);
if (isset($this->handles[$index])) {
@@ -120,11 +120,11 @@ public function attach(EventCollection $events)
/**
* Detach
*
- * @param EventCollection $events
+ * @param EventManagerInterface $events
* @return Serializer
* @throws Exception\LogicException
*/
- public function detach(EventCollection $events)
+ public function detach(EventManagerInterface $events)
{
$index = spl_object_hash($events);
if (!isset($this->handles[$index])) {
@@ -24,7 +24,7 @@
use Traversable,
Zend\Cache\Exception,
Zend\Cache\Storage\PostEvent,
- Zend\EventManager\EventCollection;
+ Zend\EventManager\EventManagerInterface;
/**
* @category Zend
@@ -45,11 +45,11 @@ class OptimizeByFactor extends AbstractPlugin
/**
* Attach
*
- * @param EventCollection $eventCollection
+ * @param EventManagerInterface $eventCollection
* @return OptimizeByFactor
* @throws Exception\LogicException
*/
- public function attach(EventCollection $eventCollection)
+ public function attach(EventManagerInterface $eventCollection)
{
$index = spl_object_hash($eventCollection);
if (isset($this->handles[$index])) {
@@ -70,11 +70,11 @@ public function attach(EventCollection $eventCollection)
/**
* Detach
*
- * @param EventCollection $eventCollection
+ * @param EventManagerInterface $eventCollection
* @return OptimizeByFactor
* @throws Exception\LogicException
*/
- public function detach(EventCollection $eventCollection)
+ public function detach(EventManagerInterface $eventCollection)
{
$index = spl_object_hash($eventCollection);
if (!isset($this->handles[$index])) {
@@ -27,7 +27,7 @@
Zend\Cache\Storage\Capabilities,
Zend\Cache\Storage\Event,
Zend\Cache\Storage\PostEvent,
- Zend\EventManager\EventCollection;
+ Zend\EventManager\EventManagerInterface;
/**
* @category Zend
@@ -53,11 +53,11 @@ class Serializer extends AbstractPlugin
/**
* Attach
*
- * @param EventCollection $eventCollection
+ * @param EventManagerInterface $eventCollection
* @return Serializer
* @throws Exception\LogicException
*/
- public function attach(EventCollection $events)
+ public function attach(EventManagerInterface $events)
{
$index = spl_object_hash($events);
if (isset($this->handles[$index])) {
@@ -103,11 +103,11 @@ public function attach(EventCollection $events)
/**
* Detach
*
- * @param EventCollection $events
+ * @param EventManagerInterface $events
* @return Serializer
* @throws Exception\LogicException
*/
- public function detach(EventCollection $events)
+ public function detach(EventManagerInterface $events)
{
$index = spl_object_hash($events);
if (!isset($this->handles[$index])) {
@@ -33,7 +33,7 @@
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
-class Event implements EventDescription
+class Event implements EventInterface
{
/**
* @var string Event name
@@ -28,7 +28,7 @@
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
-interface EventDescription
+interface EventInterface
{
/**
* Get event name
@@ -94,7 +94,7 @@ public function setParams($params);
public function setParam($name, $value);
/**
- * Indicate whether or not the parent EventCollection should stop propagating events
+ * Indicate whether or not the parent EventManagerInterface should stop propagating events
*
* @param bool $flag
* @return void
@@ -38,7 +38,7 @@
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
-class EventManager implements EventCollection, SharedEventCollectionAware
+class EventManager implements EventManagerInterface, SharedEventManagerAwareInterface
{
/**
* Subscribed events and their listeners
@@ -52,22 +52,22 @@ class EventManager implements EventCollection, SharedEventCollectionAware
protected $eventClass = 'Zend\EventManager\Event';
/**
- * Identifiers, used to pull shared signals from SharedEventCollection instance
+ * Identifiers, used to pull shared signals from SharedEventManagerInterface instance
* @var array
*/
protected $identifiers = array();
/**
* Shared connections
- * @var false|null|SharedEventCollection
+ * @var false|null|SharedEventManagerInterface
*/
protected $sharedCollections = null;
/**
* Constructor
*
* Allows optionally specifying identifier(s) to use to pull signals from a
- * SharedEventCollection.
+ * SharedEventManagerInterface.
*
* @param null|string|int|array|Traversable $identifiers
* @return void
@@ -92,10 +92,10 @@ public function setEventClass($class)
/**
* Set shared collections container
*
- * @param SharedEventCollection $connections
+ * @param SharedEventManagerInterface $connections
* @return void
*/
- public function setSharedCollections(SharedEventCollection $sharedEventCollection)
+ public function setSharedCollections(SharedEventManagerInterface $sharedEventCollection)
{
$this->sharedCollections = $sharedEventCollection;
return $this;
@@ -114,7 +114,7 @@ public function unsetSharedCollections()
/**
* Get shared collections container
*
- * @return false|SharedEventCollection
+ * @return false|SharedEventManagerInterface
*/
public function getSharedCollections()
{
@@ -179,15 +179,15 @@ public function addIdentifiers($identifiers)
*/
public function trigger($event, $target = null, $argv = array(), $callback = null)
{
- if ($event instanceof EventDescription) {
+ if ($event instanceof EventInterface) {
$e = $event;
$event = $e->getName();
$callback = $target;
- } elseif ($target instanceof EventDescription) {
+ } elseif ($target instanceof EventInterface) {
$e = $target;
$e->setName($event);
$callback = $argv;
- } elseif ($argv instanceof EventDescription) {
+ } elseif ($argv instanceof EventInterface) {
$e = $argv;
$e->setName($event);
$e->setTarget($target);
@@ -220,15 +220,15 @@ public function trigger($event, $target = null, $argv = array(), $callback = nul
*/
public function triggerUntil($event, $target, $argv = null, $callback = null)
{
- if ($event instanceof EventDescription) {
+ if ($event instanceof EventInterface) {
$e = $event;
$event = $e->getName();
$callback = $target;
- } elseif ($target instanceof EventDescription) {
+ } elseif ($target instanceof EventInterface) {
$e = $target;
$e->setName($event);
$callback = $argv;
- } elseif ($argv instanceof EventDescription) {
+ } elseif ($argv instanceof EventInterface) {
$e = $argv;
$e->setName($event);
$e->setTarget($target);
@@ -305,7 +305,7 @@ public function attach($event, $callback = null, $priority = 1)
/**
* Attach a listener aggregate
*
- * Listener aggregates accept an EventCollection instance, and call attach()
+ * Listener aggregates accept an EventManagerInterface instance, and call attach()
* one or more times, typically to attach to multiple events using local
* methods.
*
@@ -356,7 +356,7 @@ public function detach($listener)
/**
* Detach a listener aggregate
*
- * Listener aggregates accept an EventCollection instance, and call detach()
+ * Listener aggregates accept an EventManagerInterface instance, and call detach()
* of all previously attached listeners.
*
* @param ListenerAggregate $aggregate
@@ -426,11 +426,11 @@ public function prepareArgs(array $args)
* delegate.
*
* @param string $event Event name
- * @param EventDescription $e
+ * @param EventInterface $e
* @param null|callback $callback
* @return ResponseCollection
*/
- protected function triggerListeners($event, EventDescription $e, $callback = null)
+ protected function triggerListeners($event, EventInterface $e, $callback = null)
{
$responses = new ResponseCollection;
$listeners = $this->getListeners($event);
@@ -35,8 +35,8 @@
/**
* Inject an EventManager instance
*
- * @param EventCollection $eventManager
+ * @param EventManagerInterface $eventManager
* @return void
*/
- public function setEventManager(EventCollection $eventManager);
+ public function setEventManager(EventManagerInterface $eventManager);
}
@@ -30,7 +30,7 @@
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
-interface EventCollection
+interface EventManagerInterface
{
/**
* Trigger an event
@@ -18,7 +18,7 @@
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
-namespace Zend\EventManager;
+namespace Zend\EventManager\Exception;
/**
* Base exception interface
@@ -28,6 +28,6 @@
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
-interface Exception
+interface ExceptionInterface
{
}
@@ -20,8 +20,6 @@
namespace Zend\EventManager\Exception;
-use Zend\EventManager\Exception;
-
/**
* Invalid argument exception
*
@@ -31,6 +29,6 @@
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class InvalidArgumentException
- extends \InvalidArgumentException implements Exception
+ extends \InvalidArgumentException implements ExceptionInterface
{
}
Oops, something went wrong.

0 comments on commit a9608b2

Please sign in to comment.