public function _setInit($key = null, $val = null)
    {
        if (is_null($key)) {
            $this->_init = array();
        } elseif (is_null($val)) {
            unset($this->_init[$key]);
        } else {
            switch ($key) {
            case 'capability':
                if ($ci = $this->getParam('capability_ignore')) {
                    $ignored = array();

                    foreach ($ci as $val2) {
                        $c = explode('=', $val2);

                        if ($val->query($c[0], isset($c[1]) ? $c[1] : null)) {
                            $ignored[] = $val2;
                            $val->remove($c[0], isset($c[1]) ? $c[1] : null);
                        }
                    }

                    if ($this->_debug->debug && !empty($ignored)) {
                        $this->_debug->info(sprintf(
                            'CONFIG: IGNORING these IMAP capabilities: %s',
                            implode(', ', $ignored)
                        ));
                    }
                }

                $val->attach($this);
                break;
            }

            /* Nothing has changed. */
            if (isset($this->_init[$key]) && ($this->_init[$key] === $val)) {
                return;
            }

            $this->_init[$key] = $val;
        }

        $this->changed = true;
    }
public function _setInit($key = null, $val = null)
    {
        if (is_null($key)) {
            $this->_init = array();
        } elseif (is_null($val)) {
            unset($this->_init[$key]);
        } else {
            switch ($key) {
            case 'capability':
                if ($ci = $this->getParam('capability_ignore')) {
                    $ignored = array();

                    foreach ($ci as $val2) {
                        $c = explode('=', $val2);

                        if ($val->query($c[0], isset($c[1]) ? $c[1] : null)) {
                            $ignored[] = $val2;
                            $val->remove($c[0], isset($c[1]) ? $c[1] : null);
                        }
                    }

                    if ($this->_debug->debug && !empty($ignored)) {
                        $this->_debug->info(sprintf(
                            'CONFIG: IGNORING these IMAP capabilities: %s',
                            implode(', ', $ignored)
                        ));
                    }
                }

                $val->attach($this);
                break;
            }

            /* Nothing has changed. */
            if (isset($this->_init[$key]) && ($this->_init[$key] === $val)) {
                return;
            }

            $this->_init[$key] = $val;
        }

        $this->changed = true;
    }
public function _setInit ( $ key = null , $ val = null ) { if ( is_null ( $ key ) ) { $ this -> _init = array ( ) ; } elseif ( is_null ( $ val ) ) { unset ( $ this -> _init [ $ key ] ) ; } else { switch ( $ key ) { case 'capability' : if ( $ ci = $ this -> getParam ( 'capability_ignore' ) ) { $ ignored = array ( ) ; foreach ( $ ci as $ val2 ) { $ c = explode ( '=' , $ val2 ) ; if ( $ val -> query ( $ c [ 0 ] , isset ( $ c [ 1 ] ) ? $ c [ 1 ] : null ) ) { $ ignored [ ] = $ val2 ; $ val -> remove ( $ c [ 0 ] , isset ( $ c [ 1 ] ) ? $ c [ 1 ] : null ) ; } } if ( $ this -> _debug -> debug && ! empty ( $ ignored ) ) { $ this -> _debug -> info ( sprintf ( 'CONFIG: IGNORING these IMAP capabilities: %s' , implode ( ', ' , $ ignored ) ) ) ; } } $ val -> attach ( $ this ) ; break ; } /* Nothing has changed. */ if ( isset ( $ this -> _init [ $ key ] ) && ( $ this -> _init [ $ key ] === $ val ) ) { return ; } $ this -> _init [ $ key ] = $ val ; } $ this -> changed = true ; }
Set an initialization value.

@param string $key  The initialization key. If null, resets all keys.
@param mixed $val   The cached value. If null, removes the key.
Set an initialization value .