public newInstance ( ) : |
||
return |
public function newInstance()
{
// We'll set the base DN of the new Builder so
// developers don't need to do this manually.
return (new static($this->connection, $this->grammar, $this->schema))->setDn($this->getDn());
}
/** * 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; }