Horde_Imap_Client_Cache::__construct PHP Method

__construct() public method

Constructor.
public __construct ( array $params = [] )
$params array Configuration parameters:
  - REQUIRED Parameters:
    - backend: (Horde_Imap_Client_Cache_Backend) The cache backend.
    - baseob: (Horde_Imap_Client_Base) The base client object.

  - Optional Parameters:
    - debug: (Horde_Imap_Client_Base_Debug) Debug object.
             DEFAULT: No debug output
    public function __construct(array $params = array())
    {
        $this->_backend = $params['backend'];
        $this->_baseob = $params['baseob'];
        $this->_backend->setParams(array('hostspec' => $this->_baseob->getParam('hostspec'), 'port' => $this->_baseob->getParam('port'), 'username' => $this->_baseob->getParam('username')));
        if (isset($params['debug']) && $params['debug'] instanceof Horde_Imap_Client_Base_Debug) {
            $this->_debug = $params['debug'];
            $this->_debug->info(sprintf('CACHE: Using the %s storage driver.', get_class($this->_backend)));
        }
    }