Adldap\Query\Processor::processPaginated PHP Method

processPaginated() public method

Processes paginated LDAP results.
public processPaginated ( array $pages = [], integer $perPage = 50, integer $currentPage ) : Paginator
$pages array
$perPage integer
$currentPage integer
return Adldap\Objects\Paginator
    public function processPaginated(array $pages = [], $perPage = 50, $currentPage = 0)
    {
        $models = [];
        foreach ($pages as $results) {
            // Go through each page and process the results into an objects array.
            $models = array_merge($models, $this->process($results));
        }
        $models = $this->processSort($models)->toArray();
        return $this->newPaginator($models, $perPage, $currentPage, count($pages));
    }