setParams() public method

Add configuration parameters.
public setParams ( array $params = [] )
$params array Configuration parameters.
Exemplo n.º 1
0
 /**
  * Constructor.
  *
  * @param array $params  Configuration parameters:
  * <pre>
  *   - 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
  * </pre>
  */
 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)));
     }
 }