DynamicActiveRecord.php
public static function dynColDecode($encoded)
    {
        // Maria has a bug in its COLUMN_JSON funcion in which it fails to escape the
        // control characters U+0000 through U+001F. This causes JSON decoders to fail.
        // This workaround escapes those characters.
        $encoded = preg_replace_callback(
            '/[\x00-\x1f]/',
            function ($matches) {
                return sprintf('\u00%02x', ord($matches[0]));
            },
            $encoded
        );

        $decoded = json_decode($encoded, true);
        if ($decoded) {
            static::decodeArrayForMaria($decoded);
        }

        return $decoded;
    }
public static function dynColDecode($encoded)
    {
        // Maria has a bug in its COLUMN_JSON funcion in which it fails to escape the
        // control characters U+0000 through U+001F. This causes JSON decoders to fail.
        // This workaround escapes those characters.
        $encoded = preg_replace_callback(
            '/[\x00-\x1f]/',
            function ($matches) {
                return sprintf('\u00%02x', ord($matches[0]));
            },
            $encoded
        );

        $decoded = json_decode($encoded, true);
        if ($decoded) {
            static::decodeArrayForMaria($decoded);
        }

        return $decoded;
    }
public static function dynColDecode ( $ encoded ) { // Maria has a bug in its COLUMN_JSON funcion in which it fails to escape the // control characters U+0000 through U+001F. This causes JSON decoders to fail. // This workaround escapes those characters. $ encoded = preg_replace_callback ( '/[\x00-\x1f]/' , function ( $ matches ) { return sprintf ( '\u00%02x' , ord ( $ matches [ 0 ] ) ) ; } , $ encoded ) ; $ decoded = json_decode ( $ encoded , true ) ; if ( $ decoded ) { static :: decodeArrayForMaria ( $ decoded ) ; } return $ decoded ; }
Decode a serialized blob of dynamic attributes.

At present the only supported input format is JSON returned from Maria. It may work
also for PostgreSQL.

@param string $encoded Serialized array of attributes in DB-specific form

@return array Dynamic attributes in name => value pairs (possibly nested)
Decode a serialized blob of dynamic attributes .