Open Journal Systems  3.3.0
Guzzle\Parser\ParserRegistry Class Reference

Public Member Functions

 __construct ()
 
 getParser ($name)
 
 registerParser ($name, $parser)
 

Static Public Member Functions

static getInstance ()
 

Protected Attributes

 $instances = array()
 
 $mapping
 

Static Protected Attributes

static $instance
 

Detailed Description

Registry of parsers used by the application

Definition at line 8 of file ParserRegistry.php.

Constructor & Destructor Documentation

◆ __construct()

Guzzle\Parser\ParserRegistry::__construct ( )

Definition at line 43 of file ParserRegistry.php.

Member Function Documentation

◆ getInstance()

◆ getParser()

Guzzle\Parser\ParserRegistry::getParser (   $name)

Get a parser by name from an instance

Parameters
string$nameName of the parser to retrieve
Returns
mixed|null

Definition at line 58 of file ParserRegistry.php.

◆ registerParser()

Guzzle\Parser\ParserRegistry::registerParser (   $name,
  $parser 
)

Register a custom parser by name with the register

Parameters
string$nameName or handle of the parser to register
mixed$parserInstantiated parser to register

Definition at line 77 of file ParserRegistry.php.

Field Documentation

◆ $instance

Guzzle\Parser\ParserRegistry::$instance
staticprotected

Singleton instance

Definition at line 12 of file ParserRegistry.php.

Referenced by Guzzle\Parser\ParserRegistry\getInstance().

◆ $instances

ParserRegistry Guzzle\Parser\ParserRegistry::$instances = array()
protected

Definition at line 17 of file ParserRegistry.php.

◆ $mapping

array Guzzle\Parser\ParserRegistry::$mapping
protected
Initial value:
= 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

Definition at line 23 of file ParserRegistry.php.


The documentation for this class was generated from the following file: