LdapTools\Hydrator\OperationHydrator::filterAttributeValues PHP 메소드

filterAttributeValues() 보호된 메소드

Remove empty strings and null values from attribute value arrays. This prevents errors when saving to LDAP and these are present for some reason.
protected filterAttributeValues ( array $attributes ) : array
$attributes array
리턴 array
    protected function filterAttributeValues(array $attributes)
    {
        return array_filter($attributes, function ($value) {
            if (is_array($value) && empty($value)) {
                return false;
            }
            return !($value === '' || $value === null);
        });
    }