You are here

public function SimpleLdap::controlPagedResult in Simple LDAP 8

Wrapper function for ldap_control_paged_result().

Parameters

int $pagesize: The number of entries by page.

bool $iscritical: Indicates whether the pagination is critical of not. If true and if the server doesn't support pagination, the search will return no result.

string $cookie: An opaque structure sent by the server.

Return value

bool TRUE on success

Throws

\Drupal\simple_ldap\SimpleLdapException

File

src/SimpleLdap.php, line 277

Class

SimpleLdap
A wrapper for PHP's LDAP functions, with associated helper methods.

Namespace

Drupal\simple_ldap

Code

public function controlPagedResult($pagesize, $iscritical, $cookie) {
  $return = @ldap_control_paged_result($this->connection
    ->getResource(), $pagesize, $iscritical, $cookie);
  if ($return === FALSE) {
    throw new SimpleLdapException('ldap_control_paged_result wrapper: ', $this->connection
      ->getResource());
  }
  return $return;
}