19 'request.body' =>
'Guzzle\Service\Command\LocationVisitor\Request\BodyVisitor',
20 'request.header' =>
'Guzzle\Service\Command\LocationVisitor\Request\HeaderVisitor',
21 'request.json' =>
'Guzzle\Service\Command\LocationVisitor\Request\JsonVisitor',
22 'request.postField' =>
'Guzzle\Service\Command\LocationVisitor\Request\PostFieldVisitor',
23 'request.postFile' =>
'Guzzle\Service\Command\LocationVisitor\Request\PostFileVisitor',
24 'request.query' =>
'Guzzle\Service\Command\LocationVisitor\Request\QueryVisitor',
25 'request.response_body' =>
'Guzzle\Service\Command\LocationVisitor\Request\ResponseBodyVisitor',
26 'request.responseBody' =>
'Guzzle\Service\Command\LocationVisitor\Request\ResponseBodyVisitor',
27 'request.xml' =>
'Guzzle\Service\Command\LocationVisitor\Request\XmlVisitor',
28 'response.body' =>
'Guzzle\Service\Command\LocationVisitor\Response\BodyVisitor',
29 'response.header' =>
'Guzzle\Service\Command\LocationVisitor\Response\HeaderVisitor',
30 'response.json' =>
'Guzzle\Service\Command\LocationVisitor\Response\JsonVisitor',
31 'response.reasonPhrase' =>
'Guzzle\Service\Command\LocationVisitor\Response\ReasonPhraseVisitor',
32 'response.statusCode' =>
'Guzzle\Service\Command\LocationVisitor\Response\StatusCodeVisitor',
33 'response.xml' =>
'Guzzle\Service\Command\LocationVisitor\Response\XmlVisitor'
48 if (!self::$instance) {
49 self::$instance =
new self();
73 return $this->getKey(
'request.' . $visitor);
85 return $this->getKey(
'response.' . $visitor);
98 $this->cache[
'request.' . $name] = $visitor;
113 $this->cache[
'response.' . $name] = $visitor;
126 private function getKey($key)
128 if (!isset($this->cache[$key])) {
129 if (!isset($this->mappings[$key])) {
130 list($type, $name) = explode(
'.', $key);
133 $this->cache[$key] =
new $this->mappings[$key];
136 return $this->cache[$key];