protected function decodeObject($prefix, $namespace, &$object)
    {
        $customFields = ['namespace' => $namespace];
        foreach ($object as $key => $value) {
            if (false !== strpos($key, $prefix.'$')) {
                $fieldName = substr($key, \strlen($prefix) + 1);
                $customFields['data'][$fieldName] = $value;
            }
        }

        // In the case of an object-list response, namespaces are included for
        // all namespaces in any object in the result set. If a given namespace
        // is not used in a single object, we can skip custom fields entirely.
        if (!empty($customFields['data'])) {
            $object['customFields'][$namespace] = $customFields;
        }
    }
protected function decodeObject($prefix, $namespace, &$object)
    {
        $customFields = ['namespace' => $namespace];
        foreach ($object as $key => $value) {
            if (false !== strpos($key, $prefix.'$')) {
                $fieldName = substr($key, \strlen($prefix) + 1);
                $customFields['data'][$fieldName] = $value;
            }
        }

        // In the case of an object-list response, namespaces are included for
        // all namespaces in any object in the result set. If a given namespace
        // is not used in a single object, we can skip custom fields entirely.
        if (!empty($customFields['data'])) {
            $object['customFields'][$namespace] = $customFields;
        }
    }
protected function decodeObject ( $ prefix , $ namespace , & $ object ) { $ customFields = [ 'namespace' => $ namespace ] ; foreach ( $ object as $ key => $ value ) { if ( false !== strpos ( $ key , $ prefix . '$' ) ) { $ fieldName = substr ( $ key , \ strlen ( $ prefix ) + 1 ) ; $ customFields [ 'data' ] [ $ fieldName ] = $ value ; } } // In the case of an object-list response, namespaces are included for // all namespaces in any object in the result set. If a given namespace // is not used in a single object, we can skip custom fields entirely. if ( ! empty ( $ customFields [ 'data' ] ) ) { $ object [ 'customFields' ] [ $ namespace ] = $ customFields ; } }
Decodes an object's custom fields.

@param string $prefix    The prefix of the namespace in the response.
@param string $namespace The namespace identifier.
@param array  $object    The object data to decode.
Decodes an object s custom fields .