You are here

public function SimpleLdap::getEntries in Simple LDAP 8

Wrapper function for ldap_get_entries().

Parameters

resource $result_identifier: An LDAP search result identifier.

Return value

array An array of LDAP entries.

Throws

SimpleLdapException

File

src/SimpleLdap.php, line 426

Class

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

Namespace

Drupal\simple_ldap

Code

public function getEntries($result_identifier) {
  $return = @ldap_get_entries($this->connection
    ->getResource(), $result_identifier);

  // Error handling.
  if ($return === FALSE) {
    throw new SimpleLdapException('ldap_get_entries wrapper: ', $this->connection
      ->getResource());
  }
  return $return;
}