Zend_Ldap_Attribute::removeDuplicatesFromAttribute PHP Method

removeDuplicatesFromAttribute() public static method

Removes duplicate values from a LDAP attribute
public static removeDuplicatesFromAttribute ( array &$data, string $attribName ) : void
$data array
$attribName string
return void
    public static function removeDuplicatesFromAttribute(array &$data, $attribName)
    {
        $attribName = strtolower($attribName);
        if (!isset($data[$attribName])) {
            return;
        }
        $data[$attribName] = array_values(array_unique($data[$attribName]));
    }

Usage Example

Exemplo n.º 1
0
 /**
  * Removes duplicate values from a LDAP attribute
  *
  * @param  string $attribName
  * @return void
  */
 public function removeDuplicatesFromAttribute($attribName)
 {
     Zend_Ldap_Attribute::removeDuplicatesFromAttribute($this->_currentData, $attribName);
 }
All Usage Examples Of Zend_Ldap_Attribute::removeDuplicatesFromAttribute