resetPagination example

if ($pageSize > 0 && $sizeLimit >= $pageSize) {
                    $sizeLimit = 0;
                }
                $search = @$func($con$this->dn, $this->query, $this->options['filter']$this->options['attrsOnly']$sizeLimit$this->options['timeout']$this->options['deref']$this->serverctrls);

                if (false === $search) {
                    $ldapError = '';
                    if ($errno = ldap_errno($con)) {
                        $ldapError = sprintf(' LDAP error was [%d] %s', $errnoldap_error($con));
                    }
                    if ($pageControl) {
                        $this->resetPagination();
                    }

                    throw new LdapException(sprintf('Could not complete search with dn "%s", query "%s" and filters "%s".%s.', $this->dn, $this->query, implode(',', $this->options['filter'])$ldapError));
                }

                $this->results[] = $search;
                $itemsLeft -= min($itemsLeft$pageSize);

                if (0 !== $maxItems && 0 === $itemsLeft) {
                    break;
                }
                
Home | Imprint | This part of the site doesn't use cookies.