/**
* Resets the paging control so that read operations work after a paging operation is used.
*
* @throws LdapConnectionException
*/
public function resetPagingControl()
{
// Per RFC 2696, to abandon a paged search you should send a size of 0 along with the cookie used in the search.
// However, testing this it doesn't seem to completely work. Perhaps a PHP bug?
if (!@ldap_control_paged_result($this->connection->getConnection(), 0, false, $this->cookie)) {
throw new LdapConnectionException(sprintf('Unable to reset paged results control for read operation: %s', $this->connection->getLastError()));
}
}