// one request based on pageSize, we don't need to bother sending page control
// to the server so that it can determine what we already know.
if (0 !==
$maxItems &&
$pageSize >
$maxItems) { $pageSize = 0;
} elseif (0 !==
$maxItems) { $pageSize =
min($maxItems,
$pageSize);
} $pageControl =
$this->options
['scope'
] !=
static::SCOPE_BASE &&
$pageSize > 0;
$cookie = '';
do { if ($pageControl) { $this->
controlPagedResult($pageSize, true,
$cookie);
} $sizeLimit =
$itemsLeft;
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',
$errno,
ldap_error($con));
}