protected function decodeCustomFields(&$decoded)
    {
        // @todo This is O(namespaces * entries) and can be optimized.
        foreach ($decoded['$xmlns'] as $prefix => $namespace) {
            if (!isset($decoded['entries'])) {
                $this->decodeObject($prefix, $namespace, $decoded);
                continue;
            }

            foreach ($decoded['entries'] as &$entry) {
                $this->decodeObject($prefix, $namespace, $entry);
            }
        }
    }
protected function decodeCustomFields(&$decoded)
    {
        // @todo This is O(namespaces * entries) and can be optimized.
        foreach ($decoded['$xmlns'] as $prefix => $namespace) {
            if (!isset($decoded['entries'])) {
                $this->decodeObject($prefix, $namespace, $decoded);
                continue;
            }

            foreach ($decoded['entries'] as &$entry) {
                $this->decodeObject($prefix, $namespace, $entry);
            }
        }
    }
protected function decodeCustomFields ( & $ decoded ) { // @todo This is O(namespaces * entries) and can be optimized. foreach ( $ decoded [ '$xmlns' ] as $ prefix => $ namespace ) { if ( ! isset ( $ decoded [ 'entries' ] ) ) { $ this -> decodeObject ( $ prefix , $ namespace , $ decoded ) ; continue ; } foreach ( $ decoded [ 'entries' ] as & $ entry ) { $ this -> decodeObject ( $ prefix , $ namespace , $ entry ) ; } } }
Decode custom fields into a format usable by a normalizer.

mpx returns custom fields as properties on the data object, prefixed with
a namespace identifier. Custom fields are described in a single class,
and not by manually extending core data classes. To be able to normalize
those fields, they must be moved into a single property.

Custom fields are returned in a 'customFields' array, with each value
representing one mpx custom field namespace. Within each namespace array
there is a 'namespace' key with the fully-qualified mpx namespace URI,
and a 'data' key with an array of the custom field values.

@param array &$decoded The data to decode.
Decode custom fields into a format usable by a normalizer .