LdapTools\Connection\LdapConnectionInterface::getLastError PHP Method

getLastError() public method

Get the message from the LDAP server for the last operation.
public getLastError ( ) : string
return string
    public function getLastError();

Usage Example

Beispiel #1
0
 /**
  * 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()));
     }
 }