Ejemplo n.º 1
0
 /**
  * {@inheritDoc}
  */
 public function search($baseDn, $filter, array $attributes = array())
 {
     $this->logDebug(sprintf('ldap_search(%s, %s, %s)', $baseDn, $filter, implode(',', $attributes)));
     try {
         $entries = $this->driver->searchEntries($filter, $baseDn, Ldap::SEARCH_SCOPE_SUB, $attributes);
         // searchEntries don't return 'count' key as specified by php native
         // function ldap_get_entries()
         $entries['count'] = count($entries);
     } catch (ZendLdapException $exception) {
         $this->zendExceptionHandler($exception);
         throw new LdapDriverException('An error occur with the search operation.');
     }
     return $entries;
 }