westdc-core/Westdc/Service/ServiceAgent/Event.php

34 lines
691 B
PHP
Raw Permalink Normal View History

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 {
public function getListener($listenerName,$handle = ""){
2014-11-14 10:02:49 +00:00
$ListenerFactory = new ListenerFactory();
if(empty($handle))
2014-11-14 10:02:49 +00:00
{
return $ListenerFactory->get($listenerName);
2014-11-14 10:02:49 +00:00
}else{
return $ListenerFactory->get($listenerName,$handle);
2014-11-14 10:02:49 +00:00
}
}
public function getHandle($handleName = "")
2014-11-14 10:02:49 +00:00
{
$handleFactory = new HandleFactory();
return $handleFactory->get($handleName);
2014-11-14 10:02:49 +00:00
}
}