src/LdapTools/Connection/PageControl.php
public function next()
    {
        if (!$this->isEnabled) {
            return;
        }
        // If the size limit exceeds the page size, and the next page would exceed the limit, reduce the page size...
        if ($this->sizeLimit && ($this->resultNumber + $this->pageSize) > $this->sizeLimit) {
            $this->pageSize = $this->sizeLimit - $this->resultNumber;
        }
        if (!@ldap_control_paged_result($this->connection->getResource(), $this->pageSize, false, $this->cookie)) {
            throw new LdapConnectionException(sprintf(
                'Unable to enable paged results (%s): %s',
                $this->connection->getLastErrorNumber(),
                $this->connection->getLastError()
            ), $this->connection->getLastErrorNumber());
        }
    }
public function next()
    {
        if (!$this->isEnabled) {
            return;
        }
        // If the size limit exceeds the page size, and the next page would exceed the limit, reduce the page size...
        if ($this->sizeLimit && ($this->resultNumber + $this->pageSize) > $this->sizeLimit) {
            $this->pageSize = $this->sizeLimit - $this->resultNumber;
        }
        if (!@ldap_control_paged_result($this->connection->getResource(), $this->pageSize, false, $this->cookie)) {
            throw new LdapConnectionException(sprintf(
                'Unable to enable paged results (%s): %s',
                $this->connection->getLastErrorNumber(),
                $this->connection->getLastError()
            ), $this->connection->getLastErrorNumber());
        }
    }
public function next ( ) { if ( ! $ this -> isEnabled ) { return ; } // If the size limit exceeds the page size, and the next page would exceed the limit, reduce the page size... if ( $ this -> sizeLimit && ( $ this -> resultNumber + $ this -> pageSize ) > $ this -> sizeLimit ) { $ this -> pageSize = $ this -> sizeLimit - $ this -> resultNumber ; } if ( ! @ ldap_control_paged_result ( $ this -> connection -> getResource ( ) , $ this -> pageSize , false , $ this -> cookie ) ) { throw new LdapConnectionException ( sprintf ( 'Unable to enable paged results (%s): %s' , $ this -> connection -> getLastErrorNumber ( ) , $ this -> connection -> getLastError ( ) ) , $ this -> connection -> getLastErrorNumber ( ) ) ; } }
Signifies to the connection to expect the next paged result with the current cookie and page size.

@throws LdapConnectionException
Signifies to the connection to expect the next paged result with the current cookie and page size .