/** * 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']; }
/** * Returns a query builder limited to groups. * * @return Builder */ public function groups() { return $this->query->whereEquals($this->schema->objectCategory(), $this->schema->objectCategoryGroup()); }
/** * 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()]); }