Exemplo n.º 1
0
 /**
  * Kill the singleton
  */
 public function destroy()
 {
     self::$instance = null;
     $this->isOpen = false;
 }
Exemplo n.º 2
0
 /**
  * Establishes a connection with the MTA
  *
  * @return	bool	connected
  * @private
  */
 protected function connect()
 {
     $this->socket = fopen('swift://esmtp', 'w+');
     $processor = Swift_Stream_Processor::getInstance();
     $processor->addObserver(new Swift_Stream_MailProxy($processor));
     $this->readHook =& $this->socket;
     $this->writeHook =& $this->socket;
     if (!$this->socket) {
         return $this->connected = false;
     } else {
         return $this->connected = true;
     }
 }
Exemplo n.º 3
0
 /**
  * PHP's call back for fopen() actions on the fake stream
  */
 public function stream_open($path, $mode, $options, &$opened_path)
 {
     $this->processor = Swift_Stream_Processor::getInstance();
     $this->processor->isOpen = true;
     return $this->processor->isOpen;
 }