ParsingDispatcher
        ParsingDispatcher.php
                :
        18
                
    
                            
        
        
                Parsing dispatcher.
Properties¶
                
        $eventDispatcher
            ¶
    
        
        ParsingDispatcher.php
                :
        38
                
    
        | 
                     | 
                
                    
                     | 
            
                
        $parsers
            ¶
    
        
        ParsingDispatcher.php
                :
        36
                
    
        Array of parsers.
| 
                     | 
                
                    
                     | 
            
Structure:
 array(
      => array(
          => ,
         …
     }
 )
   
    Methods¶
                
__construct()
            ¶
    
        
        ParsingDispatcher.php
                :
        43
                
    
        Construct from optional parsers array.
| 
                     | 
                
                    
                     | 
            
Parameters
| Name | Type | Default value | Description | 
|---|---|---|---|
| $eventDispatcher | EventDispatcherInterface | - | - | 
| $parsers | array<string|int, mixed> | [] | - | 
                
addParser()
            ¶
    
        
        ParsingDispatcher.php
                :
        55
                
    
        Adds another parser for the given content type.
| 
                     | 
                
                    
                     | 
            
Parameters
| Name | Type | Default value | Description | 
|---|---|---|---|
| $mediaType | string | - | - | 
| $parser | Parser | - | - | 
                
parse()
            ¶
    
        
        ParsingDispatcher.php
                :
        65
                
    
        Dispatches parsing the given $data according to $mediaType.
| 
                     | 
                
                    
                     | 
            
Parameters
| Name | Type | Default value | Description | 
|---|---|---|---|
| $data | array<string|int, mixed> | - | - | 
| $mediaType | string | - | - | 
                
internalParse()
            ¶
    
        
        ParsingDispatcher.php
                :
        96
                
    
        Parses the given $data according to $mediaType.
| 
                     | 
                
                    
                     | 
            
Parameters
| Name | Type | Default value | Description | 
|---|---|---|---|
| $data | array<string|int, mixed> | - | - | 
| $mediaType | string | - | - | 
                
parseMediaTypeVersion()
            ¶
    
        
        ParsingDispatcher.php
                :
        119
                
    
        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)