newInstance() public method

Returns a new Query Builder instance.
public newInstance ( ) : Builder
return Builder
Esempio n. 1
0
 /**
  * Synchronizes the models attributes with the server values.
  *
  * @return bool
  */
 public function syncRaw()
 {
     $model = $this->query->newInstance()->findByDn($this->getDn());
     if ($model instanceof Model) {
         $this->setRawAttributes($model->getAttributes());
         return true;
     }
     return false;
 }
Esempio n. 2
0
 /**
  * Handle dynamic method calls on the query builder object.
  *
  * @param string $method
  * @param array  $parameters
  *
  * @return mixed
  */
 public function __call($method, $parameters)
 {
     $query = $this->query->newInstance();
     return call_user_func_array([$query, $method], $parameters);
 }