getImapOb() public method

Return an imap client object.
public getImapOb ( ) : mixed
return mixed An object capable of communicating with an IMAP server.
Ejemplo n.º 1
0
 /**
  * Helper to obtain a valid IMAP client. Can't inject it since the user
  * is not yet authenticated at the time of object creation.
  *
  * @return Horde_Imap_Client_Base
  * @throws Horde_ActiveSync_Exception
  */
 protected function _getImapOb()
 {
     try {
         return $this->_imap->getImapOb();
     } catch (Horde_ActiveSync_Exception $e) {
         throw new Horde_Exception_AuthenticationFailure('EMERGENCY - Unable to obtain the IMAP Client');
     }
 }
Ejemplo n.º 2
0
Archivo: Base.php Proyecto: horde/horde
 /**
  * Const'r
  *
  * @param Horde_ActiveSync_Interface_ImapFactory $imap The IMAP factory.
  * @param array $status                         The IMAP status array.
  * @param Horde_ActiveSync_Folder_Base $folder  The folder object.
  * @param Horde_Log_Logger $logger              The logger.
  */
 public function __construct(Horde_ActiveSync_Interface_ImapFactory $imap, array $status, Horde_ActiveSync_Folder_Base $folder, $logger)
 {
     $this->_imap = $imap;
     $this->_imap_ob = $imap->getImapOb();
     $this->_status = $status;
     $this->_folder = $folder;
     $this->_logger = $logger;
     $this->_procid = getmypid();
     $this->_mbox = new Horde_Imap_Client_Mailbox($folder->serverid());
 }