Overview

Namespaces

  • Contrib
    • Bundle
      • CoverallsBundle
        • Console
        • Entity
      • CoverallsV1Bundle
        • Api
        • Collector
        • Command
        • Config
        • Entity
          • Git
    • Component
      • File
      • Log
      • System
        • Git
  • Guzzle
    • Batch
      • Exception
    • Cache
    • Common
      • Exception
    • Http
      • Curl
      • Exception
      • Message
      • QueryAggregator
    • Inflection
    • Iterator
    • Log
    • Parser
      • Cookie
      • Message
      • UriTemplate
      • Url
    • Plugin
      • Async
      • Backoff
      • Cache
      • Cookie
        • CookieJar
        • Exception
      • CurlAuth
      • ErrorResponse
        • Exception
      • History
      • Log
      • Md5
      • Mock
      • Oauth
    • Service
      • Builder
      • Command
        • Factory
        • LocationVisitor
          • Request
          • Response
      • Description
      • Exception
      • Resource
    • Stream
  • PHP
  • Psr
    • Log
  • Symfony
    • Component
      • Config
        • Definition
          • Builder
          • Exception
        • Exception
        • Loader
        • Resource
        • Util
      • Console
        • Command
        • Formatter
        • Helper
        • Input
        • Output
        • Tester
      • EventDispatcher
        • Debug
      • Finder
        • Adapter
        • Comparator
        • Exception
        • Expression
        • Iterator
        • Shell
      • Stopwatch
      • Yaml
        • Exception

Classes

  • AbstractRequestVisitor
  • BodyVisitor
  • HeaderVisitor
  • JsonVisitor
  • PostFieldVisitor
  • PostFileVisitor
  • QueryVisitor
  • ResponseBodyVisitor
  • XmlVisitor

Interfaces

  • RequestVisitorInterface
  • Overview
  • Namespace
  • Class
  • Tree
  • Todo

Class JsonVisitor

Visitor used to apply a parameter to an array that will be serialized as a top level key-value pair in a JSON body

Guzzle\Service\Command\LocationVisitor\Request\AbstractRequestVisitor implements Guzzle\Service\Command\LocationVisitor\Request\RequestVisitorInterface
Extended by Guzzle\Service\Command\LocationVisitor\Request\JsonVisitor
Namespace: Guzzle\Service\Command\LocationVisitor\Request
Located at Guzzle/Service/Command/LocationVisitor/Request/JsonVisitor.php
Methods summary
public
# __construct( )

This visitor uses an SplObjectStorage to associate JSON data with commands

This visitor uses an SplObjectStorage to associate JSON data with commands

public Guzzle\Service\Command\LocationVisitor\Request\JsonVisitor
# setContentTypeHeader( string $header = 'application/json' )

Set the Content-Type header to add to the request if JSON is added to the body. This visitor does not add a Content-Type header unless you specify one here.

Set the Content-Type header to add to the request if JSON is added to the body. This visitor does not add a Content-Type header unless you specify one here.

Parameters

$header
string
$header Header to set when JSON is added (e.g. application/json)

Returns

Guzzle\Service\Command\LocationVisitor\Request\JsonVisitor
public
# visit( Guzzle\Service\Command\CommandInterface $command, Guzzle\Http\Message\RequestInterface $request, Guzzle\Service\Description\Parameter $param, mixed $value )

Called once for each parameter being visited that matches the location type

Called once for each parameter being visited that matches the location type

Parameters

$command
Guzzle\Service\Command\CommandInterface
$command Command being visited
$request
Guzzle\Http\Message\RequestInterface
$request Request being visited
$param
Guzzle\Service\Description\Parameter
$param Parameter being visited
$value
mixed
$value Value to set

Overrides

Guzzle\Service\Command\LocationVisitor\Request\AbstractRequestVisitor::visit()
public
# after( Guzzle\Service\Command\CommandInterface $command, Guzzle\Http\Message\RequestInterface $request )

Called after visiting all parameters

Called after visiting all parameters

Parameters

$command
Guzzle\Service\Command\CommandInterface
$command Command being visited
$request
Guzzle\Http\Message\RequestInterface
$request Request being visited

Overrides

Guzzle\Service\Command\LocationVisitor\Request\AbstractRequestVisitor::after()
Methods inherited from Guzzle\Service\Command\LocationVisitor\Request\AbstractRequestVisitor
prepareValue(), resolveRecursively()
Properties summary
protected boolean $jsonContentType 'application/json'
#

Whether or not to add a Content-Type header when JSON is found

Whether or not to add a Content-Type header when JSON is found

protected SplObjectStorage $data
#

Data object for persisting JSON data

Data object for persisting JSON data

php-coveralls API documentation generated by ApiGen 2.8.0