private function prepareEntriesToDeliver(array $entries)
    {
        $binaryAttributes = ['objectguid', 'objectsid'];

        foreach ($entries as $key => &$entry) {
            foreach ($binaryAttributes as $binaryAttribute) {
                if (array_key_exists($binaryAttribute, $entry)) {
                    if (is_array($entry[$binaryAttribute])) {
                        foreach ($entry[$binaryAttribute] as &$value) {
                            $value = bin2hex($value);
                        }
                    } else {
                        $entry[$binaryAttribute] = bin2hex($entry[$binaryAttribute]);
                    }
                }
            }
        }

        return $entries;
    }
private function prepareEntriesToDeliver(array $entries)
    {
        $binaryAttributes = ['objectguid', 'objectsid'];

        foreach ($entries as $key => &$entry) {
            foreach ($binaryAttributes as $binaryAttribute) {
                if (array_key_exists($binaryAttribute, $entry)) {
                    if (is_array($entry[$binaryAttribute])) {
                        foreach ($entry[$binaryAttribute] as &$value) {
                            $value = bin2hex($value);
                        }
                    } else {
                        $entry[$binaryAttribute] = bin2hex($entry[$binaryAttribute]);
                    }
                }
            }
        }

        return $entries;
    }
private function prepareEntriesToDeliver ( array $ entries ) { $ binaryAttributes = [ 'objectguid' , 'objectsid' ] ; foreach ( $ entries as $ key => & $ entry ) { foreach ( $ binaryAttributes as $ binaryAttribute ) { if ( array_key_exists ( $ binaryAttribute , $ entry ) ) { if ( is_array ( $ entry [ $ binaryAttribute ] ) ) { foreach ( $ entry [ $ binaryAttribute ] as & $ value ) { $ value = bin2hex ( $ value ) ; } } else { $ entry [ $ binaryAttribute ] = bin2hex ( $ entry [ $ binaryAttribute ] ) ; } } } } return $ entries ; }
Replaces bin values with hex representations in order to be able to deliver entries safely

@param array $entries list of entries

@return array
Replaces bin values with hex representations in order to be able to deliver entries safely