Documentation

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

$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

getInstance()

public static getInstance() : self
Tags
codeCoverageIgnore
Return values
self

getParser()

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|null

registerParser()

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


        
On this page

Search results