add namespace Westdc\Mail
This commit is contained in:
commit
2d4febd29d
|
@ -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 {
|
||||
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue