original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: 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.
docstring_tokens: Set an initialization value .