original_string: public function copyfrom($var,$func=NULL)
      {
          if (is_string($var)) {
              $var = Base::instance()->get($var);
          }
          if ($func) {
              $var = call_user_func($func, $var);
          }
          foreach ($var as $key=>$val) {
              if (
                  array_key_exists($key, $this->fields)
                  || array_key_exists($key, $this->extras)
              ) {
                  $this->set($key,$val);
              }
          }
      }
code: public function copyfrom($var,$func=NULL)
      {
          if (is_string($var)) {
              $var = Base::instance()->get($var);
          }
          if ($func) {
              $var = call_user_func($func, $var);
          }
          foreach ($var as $key=>$val) {
              if (
                  array_key_exists($key, $this->fields)
                  || array_key_exists($key, $this->extras)
              ) {
                  $this->set($key,$val);
              }
          }
      }
code_tokens: public function copyfrom ( $ var , $ func = NULL ) { if ( is_string ( $ var ) ) { $ var = Base :: instance ( ) -> get ( $ var ) ; } if ( $ func ) { $ var = call_user_func ( $ func , $ var ) ; } foreach ( $ var as $ key => $ val ) { if ( array_key_exists ( $ key , $ this -> fields ) || array_key_exists ( $ key , $ this -> extras ) ) { $ this -> set ( $ key , $ val ) ; } } }
docstring: Override parent method to accept custom property assigment
  @param  mixed $var
  @param  callable $func
  @return void
docstring_tokens: Override parent method to accept custom property assigment