Exemple #1
0
 /**
  * Rewind the Iterator to the first result item
  * Implements Iterator
  *
  * @throws Zend_Ldap_Exception
  */
 public function rewind()
 {
     if (is_resource($this->_resultId)) {
         $this->_current = @ldap_first_entry($this->_ldap->getResource(), $this->_resultId);
         /** @see Zend_Ldap_Exception */
         if ($this->_current === false && $this->_ldap->getLastErrorCode() > Zend_Ldap_Exception::LDAP_SUCCESS) {
             throw new Zend_Ldap_Exception($this->_ldap, 'getting first entry');
         }
     }
 }
 /**
  * Rewind the Iterator to the first result item
  * Implements Iterator
  *
  * @throws Zend_Ldap_Exception
  */
 public function rewind()
 {
     if (!is_resource($this->_resultId)) {
         return;
     }
     $this->_current = @ldap_first_entry($this->_ldap->getResource(), $this->_resultId);
     /**
      * @see Zend_Ldap_Exception
      */
     require_once 'Zend/Ldap/Exception.php';
     if ($this->_current === false && $this->_ldap->getLastErrorCode() > Zend_Ldap_Exception::LDAP_SUCCESS) {
         throw new Zend_Ldap_Exception($this->_ldap, 'getting first entry');
     }
     $this->_storeCurrentDn();
 }
 /**
  * @deprecated not necessary any more - will be removed
  * @param Zend_Ldap $ldap A Zend_Ldap object
  * @return int The current error code for the resource
  */
 public static function getLdapCode(Zend_Ldap $ldap = null)
 {
     if ($ldap !== null) {
         return $ldap->getLastErrorCode();
     }
     return 0;
 }