Class Guzzle\Parser\ParserRegistry

InheritanceGuzzle\Parser\ParserRegistry

Registry of parsers used by the application

Protected Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$instance Guzzle\Parser\ParserRegistry Singleton instance Guzzle\Parser\ParserRegistry
$instances array Array of parser instances Guzzle\Parser\ParserRegistry
$mapping array Mapping of parser name to default class Guzzle\Parser\ParserRegistry

Public Methods

Hide inherited methods

MethodDescriptionDefined By
__construct() Guzzle\Parser\ParserRegistry
getInstance() Guzzle\Parser\ParserRegistry
getParser() Get a parser by name from an instance Guzzle\Parser\ParserRegistry
registerParser() Register a custom parser by name with the register Guzzle\Parser\ParserRegistry

Property Details

$instance protected static property

Singleton instance

protected static Guzzle\Parser\ParserRegistry $instance null
$instances protected property

Array of parser instances

protected array $instances = []
$mapping protected property

Mapping of parser name to default class

protected array $mapping = ['message' => 'Guzzle\\Parser\\Message\\MessageParser''cookie' => 'Guzzle\\Parser\\Cookie\\CookieParser''url' => 'Guzzle\\Parser\\Url\\UrlParser''uri_template' => 'Guzzle\\Parser\\UriTemplate\\UriTemplate']

Method Details

__construct() public method

public void __construct ( )
getInstance() public static method

public static self getInstance ( )
getParser() public method

Get a parser by name from an instance

public mixed|null getParser ( $name )
$name string

Name of the parser to retrieve

registerParser() public method

Register a custom parser by name with the register

public void registerParser ( $name, $parser )
$name string

Name or handle of the parser to register

$parser mixed

Instantiated parser to register