protected function getLdapObjectsByQuery($values = [])
    {
        if (!$this->ldapQueryBuilder) {
            $query = $this->ldap->buildLdapQuery()
                ->select([$this->id, $this->labelAttribute])
                ->from($this->type);
        } else {
            $query = clone $this->ldapQueryBuilder;
        }

        if (!empty($values)) {
            foreach ($values as $value) {
                $query->orWhere([$this->id => $value]);
            }
        }
        if ($this->queryCallback) {
            $closure = $this->queryCallback;
            $closure($query);
        }

        return $query->getLdapQuery()->getResult();
    }
protected function getLdapObjectsByQuery($values = [])
    {
        if (!$this->ldapQueryBuilder) {
            $query = $this->ldap->buildLdapQuery()
                ->select([$this->id, $this->labelAttribute])
                ->from($this->type);
        } else {
            $query = clone $this->ldapQueryBuilder;
        }

        if (!empty($values)) {
            foreach ($values as $value) {
                $query->orWhere([$this->id => $value]);
            }
        }
        if ($this->queryCallback) {
            $closure = $this->queryCallback;
            $closure($query);
        }

        return $query->getLdapQuery()->getResult();
    }
protected function getLdapObjectsByQuery ( $ values = [ ] ) { if ( ! $ this -> ldapQueryBuilder ) { $ query = $ this -> ldap -> buildLdapQuery ( ) -> select ( [ $ this -> id , $ this -> labelAttribute ] ) -> from ( $ this -> type ) ; } else { $ query = clone $ this -> ldapQueryBuilder ; } if ( ! empty ( $ values ) ) { foreach ( $ values as $ value ) { $ query -> orWhere ( [ $ this -> id => $ value ] ) ; } } if ( $ this -> queryCallback ) { $ closure = $ this -> queryCallback ; $ closure ( $ query ) ; } return $ query -> getLdapQuery ( ) -> getResult ( ) ; }
Get the LDAP objects from LDAP. Optionally only get those specified by the passed values.

@param array $values The values used to narrow the LDAP query.
@return \LdapTools\Object\LdapObjectCollection
Get the LDAP objects from LDAP . Optionally only get those specified by the passed values .