Adldap\Query\Builder::newInstance PHP Method

newInstance() public method

Returns a new Query Builder instance.
public newInstance ( ) : Builder
return Builder
    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());
    }

Usage Example

Ejemplo 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;
 }
All Usage Examples Of Adldap\Query\Builder::newInstance