westdc-core/Westdc/Mail/Mail.php

43 lines
843 B
PHP
Raw Normal View History

2014-09-19 09:09:53 +00:00
<?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;
}
}