This repository has been archived by the owner on Jan 8, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#3084] Split new interface methods into separate interface
- To prevent a BC break (uncovered by running the unit tests), moved new attachAggregate() and detachAggregate() methods into a separate interface; the SharedEventManager implementation now also implements this new interface.
- Loading branch information
1 parent
4d0d275
commit a181500
Showing
3 changed files
with
41 additions
and
19 deletions.
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
library/Zend/EventManager/SharedEventAggregateAwareInterface.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?php | ||
/** | ||
* Zend Framework (http://framework.zend.com/) | ||
* | ||
* @link http://github.com/zendframework/zf2 for the canonical source repository | ||
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) | ||
* @license http://framework.zend.com/license/new-bsd New BSD License | ||
* @package Zend_EventManager | ||
*/ | ||
|
||
namespace Zend\EventManager; | ||
|
||
|
||
/** | ||
* Interface for allowing attachment of shared aggregate listeners. | ||
* | ||
* @category Zend | ||
* @package Zend_EventManager | ||
*/ | ||
interface SharedEventAggregateAwareInterface | ||
{ | ||
/** | ||
* Attach a listener aggregate | ||
* | ||
* @param SharedListenerAggregateInterface $aggregate | ||
* @param int $priority If provided, a suggested priority for the aggregate to use | ||
* @return mixed return value of {@link SharedListenerAggregateInterface::attachShared()} | ||
*/ | ||
public function attachAggregate(SharedListenerAggregateInterface $aggregate, $priority = 1); | ||
|
||
/** | ||
* Detach a listener aggregate | ||
* | ||
* @param SharedListenerAggregateInterface $aggregate | ||
* @return mixed return value of {@link SharedListenerAggregateInterface::detachShared()} | ||
*/ | ||
public function detachAggregate(SharedListenerAggregateInterface $aggregate); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters