add namespace Westdc\Mail

This commit is contained in:
Jianxuan Li 2014-09-19 17:09:53 +08:00
commit 2d4febd29d
3 changed files with 91 additions and 0 deletions

View File

@ -0,0 +1,16 @@
<?php
/**
* Created by PhpStorm.
* User: Li Jianxuan
* Date: 14-9-19
* Time: 下午3:44
*/
namespace Westdc\Mail\Listener;
use Zend\EventManager\ListenerAggregateInterface;
use Zend\EventManager\EventManagerInterface;
class StandardMailListener {
}

43
Westdc/Mail/Mail.php Normal file
View File

@ -0,0 +1,43 @@
<?php
/**
* Created by PhpStorm.
* User: Li Jianxuan
* Date: 14-9-19
* Time: 下午3:43
*/
namespace Westdc\Mail;
use Zend\EventManager\EventManagerInterface;
use Zend\EventManager\EventManager;
use Zend\EventManager\EventManagerAwareInterface;
use Zend\Mail\Message;
use Zend\Mail\Transport\Smtp as SmtpTransport;
use Zend\Mail\Transport\SmtpOptions;
class Mail {
function __construct()
{
}
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;
}
}

View File

@ -0,0 +1,32 @@
<?php
/**
* Created by PhpStorm.
* User: Li Jianxuan
* Date: 14-9-19
* Time: 下午4:22
*/
namespace Westdc\Mail;
use Zend\ServiceManager\ServiceManager;
use Zend\ServiceManager\ServiceManagerAwareInterface;
class MailService implements ServiceManagerAwareInterface {
/**
* @var ServiceManager
*/
protected $serviceManager;
/**
* @param ServiceManager $serviceManager
* @return service
*/
public function setServiceManager(ServiceManager $serviceManager)
{
$this->serviceManager = $serviceManager;
return $this;
}
}