2014-11-14 02:47:39 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Created by PhpStorm.
|
|
|
|
* User: Administrator
|
|
|
|
* Date: 2014/11/10
|
|
|
|
* Time: 11:43
|
|
|
|
*/
|
|
|
|
|
|
|
|
namespace Westdc\EventModel;
|
|
|
|
|
|
|
|
use Zend\EventManager\EventManagerInterface;
|
|
|
|
use Zend\EventManager\EventManager;
|
|
|
|
use Zend\EventManager\EventManagerAwareInterface;
|
|
|
|
|
|
|
|
abstract class AbstractEventManager {
|
|
|
|
|
2014-12-22 06:42:19 +00:00
|
|
|
protected $events;
|
|
|
|
|
2014-11-14 02:47:39 +00:00
|
|
|
public function setEventManager (EventManagerInterface $events) {
|
|
|
|
$events->setIdentifiers(array(
|
|
|
|
__CLASS__,
|
|
|
|
get_called_class(),
|
|
|
|
));
|
|
|
|
$this->events = $events;
|
|
|
|
|
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getEventManager () {
|
|
|
|
if (NULL === $this->events) {
|
|
|
|
$this->setEventManager(new EventManager());
|
|
|
|
}
|
|
|
|
|
|
|
|
return $this->events;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|