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

  • AbstractMessage
  • EntityEnclosingRequest
  • Header
  • HeaderComparison
  • PostFile
  • Request
  • RequestFactory
  • Response

Interfaces

  • EntityEnclosingRequestInterface
  • MessageInterface
  • PostFileInterface
  • RequestFactoryInterface
  • RequestInterface
  • Overview
  • Namespace
  • Class
  • Tree
  • Todo

Class AbstractMessage

Abstract HTTP request/response message

Guzzle\Http\Message\AbstractMessage implements Guzzle\Http\Message\MessageInterface

Direct known subclasses

Guzzle\Http\Message\Request, Guzzle\Http\Message\Response

Indirect known subclasses

Guzzle\Http\Message\EntityEnclosingRequest
Abstract
Namespace: Guzzle\Http\Message
Located at Guzzle/Http/Message/AbstractMessage.php
Methods summary
public Guzzle\Common\Collection
# getParams( )

Get application and plugin specific parameters set on the message.

Get application and plugin specific parameters set on the message.

Returns

Guzzle\Common\Collection

Implementation of

Guzzle\Http\Message\MessageInterface::getParams()
public Guzzle\Http\Message\MessageInterface
# addHeader( string $header, string $value )

Add a header to an existing collection of headers.

Add a header to an existing collection of headers.

Parameters

$header
string
$header Header name to add
$value
string
$value Value of the header

Returns

Guzzle\Http\Message\MessageInterface

Implementation of

Guzzle\Http\Message\MessageInterface::addHeader()
public Guzzle\Http\Message\MessageInterface
# addHeaders( array $headers )

Add and merge in an array of HTTP headers.

Add and merge in an array of HTTP headers.

Parameters

$headers
array
$headers Associative array of header data.

Returns

Guzzle\Http\Message\MessageInterface

Implementation of

Guzzle\Http\Message\MessageInterface::addHeaders()
public string|Guzzle\Http\Message\Header|null
# getHeader( string $header, boolean $string = false )

Retrieve an HTTP header by name. Performs a case-insensitive search of all headers.

Retrieve an HTTP header by name. Performs a case-insensitive search of all headers.

Parameters

$header
string
$header Header to retrieve.
$string
boolean
$string Set to true to get the header as a string

Returns

string|Guzzle\Http\Message\Header|null
Returns NULL if no matching header is found. Returns a string if $string is set to TRUE. Returns a Header object if a matching header is found.

Implementation of

Guzzle\Http\Message\MessageInterface::getHeader()
public Guzzle\Common\Collection
# getHeaders( boolean $asObjects = false )

Get all headers as a collection

Get all headers as a collection

Parameters

$asObjects
boolean
$asObjects Set to true to retrieve a collection of Header objects

Returns

Guzzle\Common\Collection
Returns a Guzzle\Common\Collection of all headers

Implementation of

Guzzle\Http\Message\MessageInterface::getHeaders()
public array
# getHeaderLines( )

Get an array of message header lines

Get an array of message header lines

Returns

array

Implementation of

Guzzle\Http\Message\MessageInterface::getHeaderLines()
public Guzzle\Http\Message\MessageInterface
# setHeader( string $header, mixed $value )

Set an HTTP header

Set an HTTP header

Parameters

$header
string
$header Name of the header to set.
$value
mixed
$value Value to set.

Returns

Guzzle\Http\Message\MessageInterface

Implementation of

Guzzle\Http\Message\MessageInterface::setHeader()
public Guzzle\Http\Message\MessageInterface
# setHeaders( array $headers )

Overwrite all HTTP headers with the supplied array of headers

Overwrite all HTTP headers with the supplied array of headers

Parameters

$headers
array
$headers Associative array of header data.

Returns

Guzzle\Http\Message\MessageInterface

Implementation of

Guzzle\Http\Message\MessageInterface::setHeaders()
public boolean
# hasHeader( string $header )

Check if the specified header is present.

Check if the specified header is present.

Parameters

$header
string
$header The header to check.

Returns

boolean
Returns TRUE or FALSE if the header is present

Implementation of

Guzzle\Http\Message\MessageInterface::hasHeader()
public Guzzle\Http\Message\MessageInterface
# removeHeader( string $header )

Remove a specific HTTP header.

Remove a specific HTTP header.

Parameters

$header
string
$header HTTP header to remove.

Returns

Guzzle\Http\Message\MessageInterface

Implementation of

Guzzle\Http\Message\MessageInterface::removeHeader()
public Guzzle\Common\Collection|null
# getTokenizedHeader( string $header, string $token = ';' )

Get a tokenized header as a Collection

Get a tokenized header as a Collection

Parameters

$header
string
$header Header to retrieve
$token
string
$token Token separator

Returns

Guzzle\Common\Collection|null

Implementation of

Guzzle\Http\Message\MessageInterface::getTokenizedHeader()
public Guzzle\Http\Message\MessageInterface
# setTokenizedHeader( string $header, array|Guzzle\Common\Collection $data, string $token = ';' )

Set a tokenized header on the request that implodes a Collection of data into a string separated by a token.

Set a tokenized header on the request that implodes a Collection of data into a string separated by a token.

Parameters

$header
string
$header Header to set
$data
array|Guzzle\Common\Collection
$data Header data
$token
string
$token Token delimiter

Returns

Guzzle\Http\Message\MessageInterface

Throws

Guzzle\Common\Exception\InvalidArgumentException
if data is not an array or Collection

Implementation of

Guzzle\Http\Message\MessageInterface::setTokenizedHeader()
public null|string
# getCacheControlDirective( string $directive )

Get a Cache-Control directive from the message

Get a Cache-Control directive from the message

Parameters

$directive
string
$directive Directive to retrieve

Returns

null|string

Implementation of

Guzzle\Http\Message\MessageInterface::getCacheControlDirective()
public boolean
# hasCacheControlDirective( string $directive )

Check if the message has a Cache-Control directive

Check if the message has a Cache-Control directive

Parameters

$directive
string
$directive Directive to check

Returns

boolean

Implementation of

Guzzle\Http\Message\MessageInterface::hasCacheControlDirective()
public Guzzle\Http\Message\MessageInterface
# addCacheControlDirective( string $directive, boolean|string $value = true )

Add a Cache-Control directive on the message

Add a Cache-Control directive on the message

Parameters

$directive
string
$directive Directive to set
$value
boolean|string
$value Value to set

Returns

Guzzle\Http\Message\MessageInterface

Implementation of

Guzzle\Http\Message\MessageInterface::addCacheControlDirective()
public Guzzle\Http\Message\MessageInterface
# removeCacheControlDirective( string $directive )

Remove a Cache-Control directive from the message

Remove a Cache-Control directive from the message

Parameters

$directive
string
$directive Directive to remove

Returns

Guzzle\Http\Message\MessageInterface

Implementation of

Guzzle\Http\Message\MessageInterface::removeCacheControlDirective()
protected
# changedHeader( string $header )

Check to see if the modified headers need to reset any of the managed headers like cache-control

Check to see if the modified headers need to reset any of the managed headers like cache-control

Parameters

$header
string
$header Header that changed
Methods inherited from Guzzle\Http\Message\MessageInterface
getRawHeaders()
Properties summary
protected array $headers array()
#

HTTP headers

HTTP headers

protected Guzzle\Common\Collection $params
#

Custom message parameters that are extendable by plugins

Custom message parameters that are extendable by plugins

protected string $protocolVersion '1.1'
#
php-coveralls API documentation generated by ApiGen 2.8.0