FOF30\Model\Model::tmpInstance PHP 메소드

tmpInstance() 공개 메소드

Returns a temporary instance of the model. Please note that this returns a _clone_ of the model object, not the original object. The new object is set up to not save its stats, ignore the request when getting state variables and comes with an empty state.
public tmpInstance ( )
    public function tmpInstance()
    {
        return $this->getClone()->savestate(false)->setIgnoreRequest(true)->clearState();
    }

Usage Example

예제 #1
0
파일: DataModel.php 프로젝트: Joal01/fof
 /**
  * Returns a temporary instance of the model. Please note that this returns a _clone_ of the model object, not the
  * original object. The new object is set up to not save its stats, ignore the request when getting state variables
  * and comes with an empty state. The temporary object instance has its data reset as well.
  *
  * @return  $this
  */
 public function tmpInstance()
 {
     return parent::tmpInstance()->reset(true, true);
 }