original_string: public function saveAs($model)
      {
          if (is_string($model)) {
              $model = $this->app->normalizeClassName($model, 'Model');
              $model = $this->add($model);
          }
          $this->_save_as = $model;
          $res = $this->save();
          $this->_save_as = null;
  
          return $res;
      }
code: public function saveAs($model)
      {
          if (is_string($model)) {
              $model = $this->app->normalizeClassName($model, 'Model');
              $model = $this->add($model);
          }
          $this->_save_as = $model;
          $res = $this->save();
          $this->_save_as = null;
  
          return $res;
      }
code_tokens: public function saveAs ( $ model ) { if ( is_string ( $ model ) ) { $ model = $ this -> app -> normalizeClassName ( $ model , 'Model' ) ; $ model = $ this -> add ( $ model ) ; } $ this -> _save_as = $ model ; $ res = $ this -> save ( ) ; $ this -> _save_as = null ; return $ res ; }
docstring: Save model into database and try to load it back as a new model of specified class.
  Instance of new class is returned.
docstring_tokens: Save model into database and try to load it back as a new model of specified class . Instance of new class is returned .