ParserRegistry
in package
Registry of parsers used by the application
Table of Contents
Properties
- $instance : ParserRegistry
- $instances : array<string|int, mixed>
- $mapping : array<string|int, mixed>
Methods
- __construct() : mixed
- getInstance() : self
- getParser() : mixed|null
- Get a parser by name from an instance
- registerParser() : mixed
- Register a custom parser by name with the register
Properties
$instance
protected
static ParserRegistry
$instance
Singleton instance
$instances
protected
array<string|int, mixed>
$instances
= array()
Array of parser instances
$mapping
protected
array<string|int, mixed>
$mapping
= array('message' => 'Guzzle\Parser\Message\MessageParser', 'cookie' => 'Guzzle\Parser\Cookie\CookieParser', 'url' => 'Guzzle\Parser\Url\UrlParser', 'uri_template' => 'Guzzle\Parser\UriTemplate\UriTemplate')
Mapping of parser name to default class
Methods
__construct()
public
__construct() : mixed
getInstance()
public
static getInstance() : self
Tags
Return values
selfgetParser()
Get a parser by name from an instance
public
getParser(string $name) : mixed|null
Parameters
- $name : string
-
Name of the parser to retrieve
Return values
mixed|nullregisterParser()
Register a custom parser by name with the register
public
registerParser(string $name, mixed $parser) : mixed
Parameters
- $name : string
-
Name or handle of the parser to register
- $parser : mixed
-
Instantiated parser to register