ParsingDispatcher
        ParsingDispatcher.php
                :
        17
                 
    
                            
        
        
                Parsing dispatcher.
Properties¶
                 $eventDispatcher
            ¶
        $eventDispatcher
            ¶
    
        
        ParsingDispatcher.php
                :
        37
                 
    
        |  |  | 
                 $parsers
            ¶
        $parsers
            ¶
    
        
        ParsingDispatcher.php
                :
        35
                 
    
        Array of parsers.
|  |  | 
Structure:
 array(
      => array(
          => ,
         …
     }
 )
   
    Methods¶
                 __construct()
            ¶
__construct()
            ¶
    
        
        ParsingDispatcher.php
                :
        42
                 
    
        Construct from optional parsers array.
|  |  | 
Parameters
| Name | Type | Default value | Description | 
|---|---|---|---|
| $eventDispatcher | EventDispatcherInterface | - | - | 
| $parsers | array<string|int, mixed> | [] | - | 
                 addParser()
            ¶
addParser()
            ¶
    
        
        ParsingDispatcher.php
                :
        57
                 
    
        Adds another parser for the given content type.
|  |  | 
Parameters
| Name | Type | Default value | Description | 
|---|---|---|---|
| $mediaType | string | - | - | 
| $parser | Parser | - | - | 
                 parse()
            ¶
parse()
            ¶
    
        
        ParsingDispatcher.php
                :
        67
                 
    
        Dispatches parsing the given $data according to $mediaType.
|  |  | 
Parameters
| Name | Type | Default value | Description | 
|---|---|---|---|
| $data | array<string|int, mixed> | - | - | 
| $mediaType | string | - | - | 
                 internalParse()
            ¶
internalParse()
            ¶
    
        
        ParsingDispatcher.php
                :
        98
                 
    
        Parses the given $data according to $mediaType.
|  |  | 
Parameters
| Name | Type | Default value | Description | 
|---|---|---|---|
| $data | array<string|int, mixed> | - | - | 
| $mediaType | string | - | - | 
                 parseMediaTypeVersion()
            ¶
parseMediaTypeVersion()
            ¶
    
        
        ParsingDispatcher.php
                :
        121
                 
    
        Parses and returns the version from a MediaType.
|  |  | 
Parameters
| Name | Type | Default value | Description | 
|---|---|---|---|
| $mediaType | string | - | Ex: text/html; version=1.1 | 
Return values
array{: string, : string}
An array with the media-type string, stripped from the version, and the version (1.0 by default)