public function getParam($key)
    {
        /* Passwords may be stored encrypted. */
        switch ($key) {
        case 'password':
            if (isset($this->_params[$key]) &&
                ($this->_params[$key] instanceof Horde_Imap_Client_Base_Password)) {
                return $this->_params[$key]->getPassword();
            }

            // DEPRECATED
            if (!empty($this->_params['_passencrypt'])) {
                try {
                    $secret = new Horde_Secret();
                    return $secret->read($this->_getEncryptKey(), $this->_params['password']);
                } catch (Exception $e) {
                    return null;
                }
            }
            break;
        }

        return isset($this->_params[$key])
            ? $this->_params[$key]
            : null;
    }
public function getParam($key)
    {
        /* Passwords may be stored encrypted. */
        switch ($key) {
        case 'password':
            if (isset($this->_params[$key]) &&
                ($this->_params[$key] instanceof Horde_Imap_Client_Base_Password)) {
                return $this->_params[$key]->getPassword();
            }

            // DEPRECATED
            if (!empty($this->_params['_passencrypt'])) {
                try {
                    $secret = new Horde_Secret();
                    return $secret->read($this->_getEncryptKey(), $this->_params['password']);
                } catch (Exception $e) {
                    return null;
                }
            }
            break;
        }

        return isset($this->_params[$key])
            ? $this->_params[$key]
            : null;
    }
public function getParam ( $ key ) { /* Passwords may be stored encrypted. */ switch ( $ key ) { case 'password' : if ( isset ( $ this -> _params [ $ key ] ) && ( $ this -> _params [ $ key ] instanceof Horde_Imap_Client_Base_Password ) ) { return $ this -> _params [ $ key ] -> getPassword ( ) ; } // DEPRECATED if ( ! empty ( $ this -> _params [ '_passencrypt' ] ) ) { try { $ secret = new Horde_Secret ( ) ; return $ secret -> read ( $ this -> _getEncryptKey ( ) , $ this -> _params [ 'password' ] ) ; } catch ( Exception $ e ) { return null ; } } break ; } return isset ( $ this -> _params [ $ key ] ) ? $ this -> _params [ $ key ] : null ; }
Returns a value from the internal params array.

@param string $key  The param key.

@return mixed  The param value, or null if not found.
Returns a value from the internal params array .