public function ParserRegistry::getParser

Get a parser by name from an instance

Parameters

string $name Name of the parser to retrieve:

Return value

mixed|null

File

drupal/core/vendor/guzzle/parser/Guzzle/Parser/ParserRegistry.php, line 63

Class

ParserRegistry
Registry of parsers used by the application

Namespace

Guzzle\Parser

Code

public function getParser($name) {
  if (!isset($this->instances[$name])) {
    if (!isset($this->mapping[$name])) {
      return null;
    }
    $class = $this->mapping[$name];
    $this->instances[$name] = new $class();
  }
  return $this->instances[$name];
}