LdapTools\Query\LdapQuery::getResultsFromLdap PHP Метод

getResultsFromLdap() защищенный Метод

protected getResultsFromLdap ( QueryOperation $operation, string $hydratorType, null | LdapObjectSchema $schema = null, null | string $alias = null ) : mixed
$operation LdapTools\Operation\QueryOperation
$hydratorType string
$schema null | LdapTools\Schema\LdapObjectSchema
$alias null | string
Результат mixed
    protected function getResultsFromLdap(QueryOperation $operation, $hydratorType, $schema = null, $alias = null)
    {
        $hydrator = $this->hydratorFactory->get($hydratorType);
        $hydrator->setLdapConnection($this->ldap);
        $hydrator->setOperationType(AttributeConverterInterface::TYPE_SEARCH_FROM);
        $hydrator->setLdapObjectSchema($schema);
        $hydrator->setSelectedAttributes($this->getAttributesToLdap($operation->getAttributes(), false, $schema, $alias));
        $opHydrator = new OperationHydrator($this->ldap);
        $opHydrator->setAlias($alias);
        $opHydrator->setOrderBy($this->orderBy);
        $opHydrator->setLdapObjectSchema($schema);
        $opHydrator->hydrateToLdap($operation);
        return $hydrator->hydrateAllFromLdap($this->ldap->execute($operation));
    }