src/LdapTools/Hydrator/ArrayHydrator.php
protected function setAttributeFromLdap(array $entry, $attribute, $value)
    {
        if (isset($value['count']) && $value['count'] == 1) {
            $entry[$attribute] = $value[0];
        } elseif (isset($value['count']) && $value['count'] > 0) {
            $entry[$attribute] = [];
            for ($i = 0; $i < $value['count']; $i++) {
                $entry[$attribute][] = $value[$i];
            }
        } elseif ($attribute === 'dn') {
            $entry[$attribute] = $value;
        }

        return $entry;
    }
protected function setAttributeFromLdap(array $entry, $attribute, $value)
    {
        if (isset($value['count']) && $value['count'] == 1) {
            $entry[$attribute] = $value[0];
        } elseif (isset($value['count']) && $value['count'] > 0) {
            $entry[$attribute] = [];
            for ($i = 0; $i < $value['count']; $i++) {
                $entry[$attribute][] = $value[$i];
            }
        } elseif ($attribute === 'dn') {
            $entry[$attribute] = $value;
        }

        return $entry;
    }
protected function setAttributeFromLdap ( array $ entry , $ attribute , $ value ) { if ( isset ( $ value [ 'count' ] ) && $ value [ 'count' ] == 1 ) { $ entry [ $ attribute ] = $ value [ 0 ] ; } elseif ( isset ( $ value [ 'count' ] ) && $ value [ 'count' ] > 0 ) { $ entry [ $ attribute ] = [ ] ; for ( $ i = 0 ; $ i < $ value [ 'count' ] ; $ i ++ ) { $ entry [ $ attribute ] [ ] = $ value [ $ i ] ; } } elseif ( $ attribute === 'dn' ) { $ entry [ $ attribute ] = $ value ; } return $ entry ; }
Given a specific attribute and value add it to the newly formed LDAP entry array.

@param array $entry
@param string $attribute
@param string|array $value
@return array
Given a specific attribute and value add it to the newly formed LDAP entry array .