src/Classes/AdldapSearch.php
private function processResults($results)
    {
        $entries = $this->connection->getEntries($results);

        $objects = [];

        if (array_key_exists('count', $entries)) {
            for ($i = 0; $i < $entries['count']; $i++) {
                $entry = $this->newLdapEntry($entries[$i], $this->connection);

                $objects[] = $entry->getAttributes();
            }

            if (!empty($this->sortByField)) {
                return $this->processSortBy($objects);
            }
        }

        return $objects;
    }
private function processResults($results)
    {
        $entries = $this->connection->getEntries($results);

        $objects = [];

        if (array_key_exists('count', $entries)) {
            for ($i = 0; $i < $entries['count']; $i++) {
                $entry = $this->newLdapEntry($entries[$i], $this->connection);

                $objects[] = $entry->getAttributes();
            }

            if (!empty($this->sortByField)) {
                return $this->processSortBy($objects);
            }
        }

        return $objects;
    }
private function processResults ( $ results ) { $ entries = $ this -> connection -> getEntries ( $ results ) ; $ objects = [ ] ; if ( array_key_exists ( 'count' , $ entries ) ) { for ( $ i = 0 ; $ i < $ entries [ 'count' ] ; $ i ++ ) { $ entry = $ this -> newLdapEntry ( $ entries [ $ i ] , $ this -> connection ) ; $ objects [ ] = $ entry -> getAttributes ( ) ; } if ( ! empty ( $ this -> sortByField ) ) { return $ this -> processSortBy ( $ objects ) ; } } return $ objects ; }
Processes LDAP search results into a nice array.

@param resource $results

@return array
Processes LDAP search results into a nice array .