예제 #1
0
 /**
  * Returns the object category model class mapping.
  *
  * @return array
  */
 protected function map()
 {
     return [$this->schema->objectCategoryComputer() => 'Adldap\\Models\\Computer', $this->schema->objectCategoryPerson() => 'Adldap\\Models\\User', $this->schema->objectCategoryGroup() => 'Adldap\\Models\\Group', $this->schema->objectCategoryExchangeServer() => 'Adldap\\Models\\ExchangeServer', $this->schema->objectCategoryContainer() => 'Adldap\\Models\\Container', $this->schema->objectCategoryPrinter() => 'Adldap\\Models\\Printer', $this->schema->objectCategoryOrganizationalUnit() => 'Adldap\\Models\\OrganizationalUnit'];
 }
예제 #2
0
 /**
  * Returns a query builder limited to groups.
  *
  * @return Builder
  */
 public function groups()
 {
     return $this->query->whereEquals($this->schema->objectCategory(), $this->schema->objectCategoryGroup());
 }
예제 #3
0
 /**
  * Creates a new group instance.
  *
  * @param array $attributes
  *
  * @return Group
  */
 public function group(array $attributes = [])
 {
     return (new Group($attributes, $this->query))->setAttribute($this->schema->objectClass(), [$this->schema->top(), $this->schema->objectCategoryGroup()]);
 }