2014-11-14 10:02:49 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Created by PhpStorm.
|
|
|
|
* User: Administrator
|
|
|
|
* Date: 2014/11/14
|
|
|
|
* Time: 11:43
|
|
|
|
*/
|
|
|
|
|
|
|
|
namespace Westdc\Service\ServiceAgent;
|
|
|
|
|
|
|
|
use Westdc\EventModel\ListenerFactory;
|
|
|
|
use Westdc\EventModel\HandleFactory;
|
|
|
|
|
|
|
|
class Event {
|
|
|
|
|
2014-11-17 06:07:56 +00:00
|
|
|
public function getListener($listenerName,$handle = ""){
|
2014-11-14 10:02:49 +00:00
|
|
|
$ListenerFactory = new ListenerFactory();
|
2014-11-17 06:07:56 +00:00
|
|
|
if(empty($handle))
|
2014-11-14 10:02:49 +00:00
|
|
|
{
|
2014-11-17 06:07:56 +00:00
|
|
|
return $ListenerFactory->get($listenerName);
|
2014-11-14 10:02:49 +00:00
|
|
|
}else{
|
2014-11-17 06:07:56 +00:00
|
|
|
return $ListenerFactory->get($listenerName,$handle);
|
2014-11-14 10:02:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-11-17 06:07:56 +00:00
|
|
|
public function getHandle($handleName = "")
|
2014-11-14 10:02:49 +00:00
|
|
|
{
|
2014-11-17 06:07:56 +00:00
|
|
|
$handleFactory = new HandleFactory();
|
|
|
|
|
|
|
|
return $handleFactory->get($handleName);
|
2014-11-14 10:02:49 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|