Horde_Ldap_Util::splitAttributeString PHP 메소드

splitAttributeString() 공개 정적인 메소드

The split will occur at the first unescaped '=' character.
public static splitAttributeString ( string $attr ) : array
$attr string An attribute-value string.
리턴 array Indexed array: 0=attribute name, 1=attribute value.
    public static function splitAttributeString($attr)
    {
        return preg_split('/(?<!\\\\)=/', $attr, 2);
    }

Usage Example

예제 #1
0
파일: Ldap.php 프로젝트: DSNS-LAB/Dmail
 /**
  * Returns the win32 AD epoch number of days the password may be unchanged.
  *
  * @return integer|boolean  Number of days or false if no limit.
  */
 protected function _getMaxPasswd()
 {
     $dn = Horde_Ldap_Util::explodeDN($this->_params['basedn']);
     $domaindn = array();
     foreach ($dn as $rdn) {
         $attribute = Horde_Ldap_Util::splitAttributeString($rdn);
         if ($attribute[0] == 'DC') {
             $domaindn[] = $rdn;
         }
     }
     $dn = Horde_Ldap_Util::canonicalDN($domaindn);
     $search = $this->_ldap->search($domaindn, 'objectClass=*');
     $entry = $search->shiftEntry();
     try {
         return $entry->getValue('maxPwdAge', 'single');
     } catch (Horde_Ldap_Exception $e) {
         return false;
     }
 }
All Usage Examples Of Horde_Ldap_Util::splitAttributeString