/** * 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'); } }
/** * 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()); }