| Zend_Notification |
| Under Construction This proposal is under construction and is not ready for review. |
<ac:macro ac:name="unmigrated-inline-wiki-markup"><ac:plain-text-body><![CDATA[
Zend_Notification is a component based on Apple's NSNotification idea.Zend Framework: Zend_Notification Component Proposal
Proposed Component Name
Zend_Notification
Developer Notes
http://framework.zend.com/wiki/display/ZFDEV/Zend_Notification
Proposers
Jurriën Stutterheim
Revision
1.0 - 29 December 2007: Setting up first draft (wiki revision: 5)
Table of Contents
1. Overview
It's an observer pattern implementation for system wide event notification.
For a detailed explanation, please see the documentation in the references section.2. References
3. Component Requirements, Constraints, and Acceptance Criteria
- This section will be updated in the near future
4. Dependencies on Other Framework Components
- Zend_Exception
5. Theory of Operation
The component is instantiated with a mind-link that ...
6. Milestones / Tasks
- Milestone 1: finish this proposal
- Milestone 2: collect and process comments
- Milestone 3: write documentation
- Milestone 4: write unit tests
- Milestone 5: get approval and move the component to incubator
- Milestone 6: finish component and move it to core
7. Class Index
- Zend_Notification
- Zend_Notification_Center
- Zend_Notification_Observer_Interface
- Zend_Notification_Exception
8. Use Cases
| UC-01 |
|---|
class CoffeeShop_Customer implements Zend_Notification_Observer_Interface
{
public function __construct()
public function notify(Zend_Notification $notification)
{
$userInfo = $notification->getUserInfo();
$sender = $notification->getObject();
switch ($notification->getName())
if ($sender instanceof CoffeeShop)
}
}
class CoffeeShop
{
protected $_notificationCenter;
public function __construct()
public function bakePie()
{
$pie = new Pie();
while (!$pie->isDone())
$this->_notificationCenter->postNotification('pieIsReady', $this, array('pie' => $pie));
}
public function makeCoffee()
}