original_string: public function setFormatter($field, $formatter, $options = null)
      {
          // support for field names as array
          if (is_array($field)) {
              foreach ($field as $f) {
                  $this->setFormatter($f, $formatter, $options);
              }
  
              return $this;
          }
  
          if (!isset($this->columns[$field])) {
              throw new BaseException('Cannot format nonexistant field '.$field);
          }
  
          $this->columns[$field]['type'] = '';
          $this->addFormatter($field, $formatter, $options);
          $this->last_column = $field;
  
          return $this;
      }
code: public function setFormatter($field, $formatter, $options = null)
      {
          // support for field names as array
          if (is_array($field)) {
              foreach ($field as $f) {
                  $this->setFormatter($f, $formatter, $options);
              }
  
              return $this;
          }
  
          if (!isset($this->columns[$field])) {
              throw new BaseException('Cannot format nonexistant field '.$field);
          }
  
          $this->columns[$field]['type'] = '';
          $this->addFormatter($field, $formatter, $options);
          $this->last_column = $field;
  
          return $this;
      }
code_tokens: public function setFormatter ( $ field , $ formatter , $ options = null ) { // support for field names as array if ( is_array ( $ field ) ) { foreach ( $ field as $ f ) { $ this -> setFormatter ( $ f , $ formatter , $ options ) ; } return $ this ; } if ( ! isset ( $ this -> columns [ $ field ] ) ) { throw new BaseException ( 'Cannot format nonexistant field ' . $ field ) ; } $ this -> columns [ $ field ] [ 'type' ] = '' ; $ this -> addFormatter ( $ field , $ formatter , $ options ) ; $ this -> last_column = $ field ; return $ this ; }
docstring: Replace current formatter for field.
  
  @param string|array $field
  @param mixed        $formatter
  
  @return $this
docstring_tokens: Replace current formatter for field .