Open Monograph Press  3.3.0
Guzzle\Http\Message\Response Class Reference
Inheritance diagram for Guzzle\Http\Message\Response:
Guzzle\Http\Message\AbstractMessage Guzzle\Http\Message\MessageInterface

Public Member Functions

 __construct ($statusCode, $headers=null, $body=null)
 
 __toString ()
 
 calculateAge ()
 
 canCache ()
 
 canValidate ()
 
 getAcceptRanges ()
 
 getAge ()
 
 getAllow ()
 
 getBody ($asString=false)
 
 getCacheControl ()
 
 getConnection ()
 
 getContentDisposition ()
 
 getContentEncoding ()
 
 getContentLanguage ()
 
 getContentLength ()
 
 getContentLocation ()
 
 getContentMd5 ()
 
 getContentRange ()
 
 getContentType ()
 
 getDate ()
 
 getEffectiveUrl ()
 
 getEtag ()
 
 getExpires ()
 
 getFreshness ()
 
 getInfo ($key=null)
 
 getLastModified ()
 
 getLocation ()
 
 getMaxAge ()
 
 getMessage ()
 
 getPragma ()
 
 getPreviousResponse ()
 
 getProtocol ()
 
 getProtocolVersion ()
 
 getProxyAuthenticate ()
 
 getRawHeaders ()
 
 getReasonPhrase ()
 
 getRedirectCount ()
 
 getRequest ()
 
 getRetryAfter ()
 
 getServer ()
 
 getSetCookie ()
 
 getStatusCode ()
 
 getTrailer ()
 
 getTransferEncoding ()
 
 getVary ()
 
 getVia ()
 
 getWarning ()
 
 getWwwAuthenticate ()
 
 isClientError ()
 
 isContentType ($type)
 
 isError ()
 
 isFresh ()
 
 isInformational ()
 
 isMethodAllowed ($method)
 
 isRedirect ()
 
 isServerError ()
 
 isSuccessful ()
 
 json ()
 
 serialize ()
 
 setBody ($body)
 
 setEffectiveUrl ($url)
 
 setInfo (array $info)
 
 setProtocol ($protocol, $version)
 
 setRequest ($request)
 
 setStatus ($statusCode, $reasonPhrase='')
 
 unserialize ($serialize)
 
 xml ()
 
- Public Member Functions inherited from Guzzle\Http\Message\AbstractMessage
 __construct ()
 
 addCacheControlDirective ($directive, $value=true)
 
 addHeader ($header, $value)
 
 addHeaders (array $headers)
 
 getCacheControlDirective ($directive)
 
 getHeader ($header)
 
 getHeaderLines ()
 
 getHeaders ()
 
 getParams ()
 
 getTokenizedHeader ($header, $token=';')
 
 hasCacheControlDirective ($directive)
 
 hasHeader ($header)
 
 removeCacheControlDirective ($directive)
 
 removeHeader ($header)
 
 setHeader ($header, $value)
 
 setHeaderFactory (HeaderFactoryInterface $factory)
 
 setHeaders (array $headers)
 
 setTokenizedHeader ($header, $data, $token=';')
 

Static Public Member Functions

static fromMessage ($message)
 

Protected Attributes

 $body
 
 $effectiveUrl
 
 $info = array()
 
 $reasonPhrase
 
 $statusCode
 
- Protected Attributes inherited from Guzzle\Http\Message\AbstractMessage
 $headerFactory
 
 $headers
 
 $params
 
 $protocol = 'HTTP'
 
 $protocolVersion = '1.1'
 

Static Protected Attributes

static $cacheResponseCodes = array(200, 203, 206, 300, 301, 410)
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

Guzzle\Http\Message\Response::__construct (   $statusCode,
  $headers = null,
  $body = null 
)

Construct the response

Parameters
string$statusCodeThe response status code (e.g. 200, 404, etc)
ToArrayInterface | array$headersThe response headers
string | resource | EntityBodyInterface$bodyThe body of the response
Exceptions
BadResponseExceptionif an invalid response code is given

Definition at line 153 of file paymethod/paypal/lib/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Response.php.

References Guzzle\Http\Message\Response\$body, Guzzle\Http\Message\AbstractMessage\$headers, Guzzle\Http\Message\Response\$statusCode, Guzzle\Http\EntityBody\factory(), Guzzle\Http\Message\AbstractMessage\setHeaders(), and Guzzle\Http\Message\Response\setStatus().

Member Function Documentation

◆ __toString()

Guzzle\Http\Message\Response::__toString ( )

◆ calculateAge()

◆ canCache()

◆ canValidate()

Guzzle\Http\Message\Response::canValidate ( )

Check if the response can be validated against the origin server using a conditional GET request.

Returns
bool

Definition at line 843 of file paymethod/paypal/lib/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Response.php.

References Guzzle\Http\Message\Response\getEtag(), and Guzzle\Http\Message\Response\getLastModified().

Referenced by Guzzle\Http\Message\Response\canCache().

◆ fromMessage()

◆ getAcceptRanges()

Guzzle\Http\Message\Response::getAcceptRanges ( )

Get the Accept-Ranges HTTP header

Returns
string Returns what partial content range types this server supports.

Definition at line 371 of file paymethod/paypal/lib/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Response.php.

References Guzzle\Http\Message\AbstractMessage\getHeader().

◆ getAge()

Guzzle\Http\Message\Response::getAge ( )

Get the Age HTTP header

Returns
integer|null Returns the age the object has been in a proxy cache in seconds.

Definition at line 397 of file paymethod/paypal/lib/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Response.php.

References Guzzle\Http\Message\AbstractMessage\getHeader().

Referenced by Guzzle\Plugin\Cache\CachePlugin\canResponseSatisfyFailedRequest().

◆ getAllow()

Guzzle\Http\Message\Response::getAllow ( )

Get the Allow HTTP header

Returns
string|null Returns valid actions for a specified resource. To be used for a 405 Method not allowed.

Definition at line 407 of file paymethod/paypal/lib/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Response.php.

References Guzzle\Http\Message\AbstractMessage\getHeader().

◆ getBody()

Guzzle\Http\Message\Response::getBody (   $asString = false)

Get the response entity body

Parameters
bool$asStringSet to TRUE to return a string of the body rather than a full body object
Returns
EntityBodyInterface|string

Definition at line 200 of file paymethod/paypal/lib/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Response.php.

Referenced by Guzzle\Plugin\Cache\DefaultCacheStorage\cache(), Guzzle\Http\Message\Response\canCache(), and Guzzle\Service\Command\LocationVisitor\Response\BodyVisitor\visit().

◆ getCacheControl()

Guzzle\Http\Message\Response::getCacheControl ( )

Get the Cache-Control HTTP header

Returns
string

Definition at line 438 of file paymethod/paypal/lib/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Response.php.

References Guzzle\Http\Message\AbstractMessage\getHeader().

◆ getConnection()

Guzzle\Http\Message\Response::getConnection ( )

Get the Connection HTTP header

Returns
string

Definition at line 448 of file paymethod/paypal/lib/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Response.php.

References Guzzle\Http\Message\AbstractMessage\getHeader().

◆ getContentDisposition()

Guzzle\Http\Message\Response::getContentDisposition ( )

Get the Content-Disposition HTTP header

Returns
string|null Returns the Content-Disposition header

Definition at line 498 of file paymethod/paypal/lib/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Response.php.

References Guzzle\Http\Message\AbstractMessage\getHeader().

◆ getContentEncoding()

Guzzle\Http\Message\Response::getContentEncoding ( )

Get the Content-Encoding HTTP header

Returns
string|null

Definition at line 458 of file paymethod/paypal/lib/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Response.php.

References Guzzle\Http\Message\AbstractMessage\getHeader().

◆ getContentLanguage()

Guzzle\Http\Message\Response::getContentLanguage ( )

Get the Content-Language HTTP header

Returns
string|null Returns the language the content is in.

Definition at line 468 of file paymethod/paypal/lib/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Response.php.

References Guzzle\Http\Message\AbstractMessage\getHeader().

◆ getContentLength()

Guzzle\Http\Message\Response::getContentLength ( )

Get the Content-Length HTTP header

Returns
integer Returns the length of the response body in bytes

Definition at line 478 of file paymethod/paypal/lib/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Response.php.

References Guzzle\Http\Message\AbstractMessage\getHeader().

Referenced by Guzzle\Http\Message\Response\canCache().

◆ getContentLocation()

Guzzle\Http\Message\Response::getContentLocation ( )

Get the Content-Location HTTP header

Returns
string|null Returns an alternate location for the returned data (e.g /index.htm)

Definition at line 488 of file paymethod/paypal/lib/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Response.php.

References Guzzle\Http\Message\AbstractMessage\getHeader().

◆ getContentMd5()

Guzzle\Http\Message\Response::getContentMd5 ( )

Get the Content-MD5 HTTP header

Returns
string|null Returns a Base64-encoded binary MD5 sum of the content of the response.

Definition at line 508 of file paymethod/paypal/lib/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Response.php.

References Guzzle\Http\Message\AbstractMessage\getHeader().

◆ getContentRange()

Guzzle\Http\Message\Response::getContentRange ( )

Get the Content-Range HTTP header

Returns
string Returns where in a full body message this partial message belongs (e.g. bytes 21010-47021/47022).

Definition at line 518 of file paymethod/paypal/lib/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Response.php.

References Guzzle\Http\Message\AbstractMessage\getHeader().

◆ getContentType()

Guzzle\Http\Message\Response::getContentType ( )

Get the Content-Type HTTP header

Returns
string Returns the mime type of this content.

Definition at line 528 of file paymethod/paypal/lib/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Response.php.

References Guzzle\Http\Message\AbstractMessage\getHeader().

◆ getDate()

Guzzle\Http\Message\Response::getDate ( )

Get the Date HTTP header

Returns
string|null Returns the date and time that the message was sent.

Definition at line 552 of file paymethod/paypal/lib/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Response.php.

References Guzzle\Http\Message\AbstractMessage\getHeader().

Referenced by Guzzle\Http\Message\Response\calculateAge().

◆ getEffectiveUrl()

Guzzle\Http\Message\Response::getEffectiveUrl ( )

Get the effective URL that resulted in this response (e.g. the last redirect URL)

Returns
string

Definition at line 949 of file paymethod/paypal/lib/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Response.php.

References Guzzle\Http\Message\Response\$effectiveUrl.

◆ getEtag()

Guzzle\Http\Message\Response::getEtag ( )

◆ getExpires()

Guzzle\Http\Message\Response::getExpires ( )

Get the Expires HTTP header

Returns
string|null Returns the date/time after which the response is considered stale.

Definition at line 572 of file paymethod/paypal/lib/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Response.php.

References Guzzle\Http\Message\AbstractMessage\getHeader().

Referenced by Guzzle\Http\Message\Response\getMaxAge().

◆ getFreshness()

Guzzle\Http\Message\Response::getFreshness ( )

Get the freshness of the response by returning the difference of the maximum lifetime of the response and the age of the response (max-age - age).

Freshness values less than 0 mean that the response is no longer fresh and is ABS(freshness) seconds expired. Freshness values of greater than zero is the number of seconds until the response is no longer fresh. A NULL result means that no freshness information is available.

Returns
int

Definition at line 858 of file paymethod/paypal/lib/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Response.php.

References Guzzle\Http\Message\Response\calculateAge(), and Guzzle\Http\Message\Response\getMaxAge().

Referenced by Guzzle\Http\Message\Response\canCache(), Guzzle\Plugin\Cache\CachePlugin\canResponseSatisfyRequest(), and Guzzle\Http\Message\Response\isFresh().

◆ getInfo()

Guzzle\Http\Message\Response::getInfo (   $key = null)

Get a cURL transfer information

Parameters
string$keyA single statistic to check
Returns
array|string|null Returns all stats if no key is set, a single stat if a key is set, or null if a key is set and not found http://www.php.net/manual/en/function.curl-getinfo.php

Definition at line 264 of file paymethod/paypal/lib/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Response.php.

References Guzzle\Http\Message\Response\$info.

◆ getLastModified()

Guzzle\Http\Message\Response::getLastModified ( )

Get the Last-Modified HTTP header

Returns
string|null Returns the last modified date for the requested object, in RFC 2822 format (e.g. Tue, 15 Nov 1994 12:45:26 GMT)

Definition at line 583 of file paymethod/paypal/lib/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Response.php.

References Guzzle\Http\Message\AbstractMessage\getHeader().

Referenced by Guzzle\Http\Message\Response\canValidate(), and Guzzle\Plugin\Cache\DefaultRevalidation\createRevalidationRequest().

◆ getLocation()

Guzzle\Http\Message\Response::getLocation ( )

Get the Location HTTP header

Returns
string|null Used in redirection, or when a new resource has been created.

Definition at line 593 of file paymethod/paypal/lib/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Response.php.

References Guzzle\Http\Message\AbstractMessage\getHeader().

Referenced by Guzzle\Http\RedirectPlugin\prepareRedirection().

◆ getMaxAge()

Guzzle\Http\Message\Response::getMaxAge ( )

Gets the number of seconds from the current time in which this response is still considered fresh

Returns
int|null Returns the number of seconds

Definition at line 804 of file paymethod/paypal/lib/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Response.php.

References Guzzle\Http\Message\Response\getExpires(), and Guzzle\Http\Message\AbstractMessage\getHeader().

Referenced by Guzzle\Plugin\Cache\DefaultCacheStorage\cache(), Guzzle\Plugin\Cache\CachePlugin\canResponseSatisfyFailedRequest(), and Guzzle\Http\Message\Response\getFreshness().

◆ getMessage()

Guzzle\Http\Message\Response::getMessage ( )

◆ getPragma()

Guzzle\Http\Message\Response::getPragma ( )

Get the Pragma HTTP header

Returns
Header|null Returns the implementation-specific headers that may have various effects anywhere along the request-response chain.

Definition at line 604 of file paymethod/paypal/lib/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Response.php.

References Guzzle\Http\Message\AbstractMessage\getHeader().

◆ getPreviousResponse()

Guzzle\Http\Message\Response::getPreviousResponse ( )

◆ getProtocol()

Guzzle\Http\Message\Response::getProtocol ( )

Get the protocol used for the response (e.g. HTTP)

Returns
string

Definition at line 240 of file paymethod/paypal/lib/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Response.php.

References Guzzle\Http\Message\AbstractMessage\$protocol.

◆ getProtocolVersion()

Guzzle\Http\Message\Response::getProtocolVersion ( )

◆ getProxyAuthenticate()

Guzzle\Http\Message\Response::getProxyAuthenticate ( )

Get the Proxy-Authenticate HTTP header

Returns
string|null Authentication to access the proxy (e.g. Basic)

Definition at line 614 of file paymethod/paypal/lib/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Response.php.

References Guzzle\Http\Message\AbstractMessage\getHeader().

◆ getRawHeaders()

Guzzle\Http\Message\Response::getRawHeaders ( )

◆ getReasonPhrase()

Guzzle\Http\Message\Response::getReasonPhrase ( )

◆ getRedirectCount()

Guzzle\Http\Message\Response::getRedirectCount ( )

Get the redirect count of this response

Returns
int

Definition at line 925 of file paymethod/paypal/lib/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Response.php.

References Guzzle\Http\RedirectPlugin\REDIRECT_COUNT.

◆ getRequest()

Guzzle\Http\Message\Response::getRequest ( )

◆ getRetryAfter()

Guzzle\Http\Message\Response::getRetryAfter ( )

Get the Retry-After HTTP header

Returns
int|null If an entity is temporarily unavailable, this instructs the client to try again after a specified period of time.

Definition at line 625 of file paymethod/paypal/lib/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Response.php.

References Guzzle\Http\Message\AbstractMessage\getHeader().

◆ getServer()

Guzzle\Http\Message\Response::getServer ( )

Get the Server HTTP header

Returns
string|null A name for the server

Definition at line 635 of file paymethod/paypal/lib/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Response.php.

References Guzzle\Http\Message\AbstractMessage\getHeader().

◆ getSetCookie()

Guzzle\Http\Message\Response::getSetCookie ( )

Get the Set-Cookie HTTP header

Returns
string|null An HTTP cookie.

Definition at line 645 of file paymethod/paypal/lib/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Response.php.

References Guzzle\Http\Message\AbstractMessage\getHeader().

◆ getStatusCode()

◆ getTrailer()

Guzzle\Http\Message\Response::getTrailer ( )

Get the Trailer HTTP header

Returns
string|null The Trailer general field value indicates that the given set of header fields is present in the trailer of a message encoded with chunked transfer-coding.

Definition at line 656 of file paymethod/paypal/lib/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Response.php.

References Guzzle\Http\Message\AbstractMessage\getHeader().

◆ getTransferEncoding()

Guzzle\Http\Message\Response::getTransferEncoding ( )

Get the Transfer-Encoding HTTP header

Returns
string|null The form of encoding used to safely transfer the entity to the user

Definition at line 666 of file paymethod/paypal/lib/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Response.php.

References Guzzle\Http\Message\AbstractMessage\getHeader().

Referenced by Guzzle\Http\Message\Response\canCache().

◆ getVary()

Guzzle\Http\Message\Response::getVary ( )

Get the Vary HTTP header

Returns
string|null Tells downstream proxies how to match future request headers to decide whether the cached response can be used rather than requesting a fresh one from the origin server.

Definition at line 677 of file paymethod/paypal/lib/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Response.php.

References Guzzle\Http\Message\AbstractMessage\getHeader().

Referenced by Guzzle\Plugin\Cache\DefaultCacheStorage\cache().

◆ getVia()

Guzzle\Http\Message\Response::getVia ( )

Get the Via HTTP header

Returns
string|null Informs the client of proxies through which the response was sent.

Definition at line 687 of file paymethod/paypal/lib/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Response.php.

References Guzzle\Http\Message\AbstractMessage\getHeader().

◆ getWarning()

Guzzle\Http\Message\Response::getWarning ( )

Get the Warning HTTP header

Returns
string|null A general warning about possible problems with the entity body

Definition at line 697 of file paymethod/paypal/lib/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Response.php.

References Guzzle\Http\Message\AbstractMessage\getHeader().

◆ getWwwAuthenticate()

Guzzle\Http\Message\Response::getWwwAuthenticate ( )

Get the WWW-Authenticate HTTP header

Returns
string|null Indicates the authentication scheme that should be used to access the requested entity

Definition at line 707 of file paymethod/paypal/lib/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Response.php.

References Guzzle\Http\Message\AbstractMessage\getHeader().

◆ isClientError()

Guzzle\Http\Message\Response::isClientError ( )

◆ isContentType()

Guzzle\Http\Message\Response::isContentType (   $type)

Checks if the Content-Type is of a certain type. This is useful if the Content-Type header contains charset information and you need to know if the Content-Type matches a particular type.

Parameters
string$typeContent type to check against
Returns
bool

Definition at line 542 of file paymethod/paypal/lib/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Response.php.

References Guzzle\Http\Message\AbstractMessage\getHeader().

◆ isError()

Guzzle\Http\Message\Response::isError ( )

Checks if HTTP Status code is Server OR Client Error (4xx or 5xx)

Returns
boolean

Definition at line 727 of file paymethod/paypal/lib/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Response.php.

References Guzzle\Http\Message\Response\isClientError(), and Guzzle\Http\Message\Response\isServerError().

◆ isFresh()

Guzzle\Http\Message\Response::isFresh ( )

Check if the response is considered fresh.

A response is considered fresh when its age is less than or equal to the freshness lifetime (maximum age) of the response.

Returns
bool|null

Definition at line 831 of file paymethod/paypal/lib/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Response.php.

References Guzzle\Http\Message\Response\getFreshness().

Referenced by Guzzle\Plugin\Cache\CachePlugin\addResponseHeaders(), Guzzle\Http\Message\Response\canCache(), and Guzzle\Plugin\Cache\CachePlugin\canResponseSatisfyRequest().

◆ isInformational()

Guzzle\Http\Message\Response::isInformational ( )

Checks if HTTP Status code is Information (1xx)

Returns
bool

Definition at line 737 of file paymethod/paypal/lib/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Response.php.

◆ isMethodAllowed()

Guzzle\Http\Message\Response::isMethodAllowed (   $method)

Check if an HTTP method is allowed by checking the Allow response header

Parameters
string$methodMethod to check
Returns
bool

Definition at line 419 of file paymethod/paypal/lib/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Response.php.

References Guzzle\Http\Message\AbstractMessage\getHeader().

◆ isRedirect()

Guzzle\Http\Message\Response::isRedirect ( )

Checks if HTTP Status code is a Redirect (3xx)

Returns
bool

Definition at line 747 of file paymethod/paypal/lib/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Response.php.

◆ isServerError()

Guzzle\Http\Message\Response::isServerError ( )

Checks if HTTP Status code is Server Error (5xx)

Returns
bool

Definition at line 757 of file paymethod/paypal/lib/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Response.php.

Referenced by Guzzle\Http\Exception\BadResponseException\factory(), and Guzzle\Http\Message\Response\isError().

◆ isSuccessful()

Guzzle\Http\Message\Response::isSuccessful ( )

Checks if HTTP Status code is Successful (2xx | 304)

Returns
bool

Definition at line 767 of file paymethod/paypal/lib/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Response.php.

Referenced by Guzzle\Plugin\Cache\DefaultCanCacheStrategy\canCacheResponse().

◆ json()

Guzzle\Http\Message\Response::json ( )

Parse the JSON response body and return an array

Returns
array|string|int|bool|float
Exceptions
RuntimeExceptionif the response body is not in JSON format

Definition at line 872 of file paymethod/paypal/lib/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Response.php.

Referenced by Guzzle\Service\Command\DefaultResponseParser\handleParsing().

◆ serialize()

Guzzle\Http\Message\Response::serialize ( )

◆ setBody()

Guzzle\Http\Message\Response::setBody (   $body)

Set the response entity body

Parameters
EntityBodyInterface | string$bodyBody to set
Returns
self

Definition at line 212 of file paymethod/paypal/lib/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Response.php.

References Guzzle\Http\Message\Response\$body, and Guzzle\Http\EntityBody\factory().

◆ setEffectiveUrl()

Guzzle\Http\Message\Response::setEffectiveUrl (   $url)

Set the effective URL that resulted in this response (e.g. the last redirect URL)

Parameters
string$urlThe effective URL
Returns
self

Definition at line 937 of file paymethod/paypal/lib/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Response.php.

◆ setInfo()

Guzzle\Http\Message\Response::setInfo ( array  $info)

Set the transfer information

Parameters
array$infoArray of cURL transfer stats
Returns
self

Definition at line 282 of file paymethod/paypal/lib/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Response.php.

References Guzzle\Http\Message\Response\$info.

◆ setProtocol()

Guzzle\Http\Message\Response::setProtocol (   $protocol,
  $version 
)

Set the protocol and protocol version of the response

Parameters
string$protocolResponse protocol
string$versionProtocol version
Returns
self

Definition at line 227 of file paymethod/paypal/lib/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Response.php.

References Guzzle\Http\Message\AbstractMessage\$protocol.

◆ setRequest()

Guzzle\Http\Message\Response::setRequest (   $request)

◆ setStatus()

Guzzle\Http\Message\Response::setStatus (   $statusCode,
  $reasonPhrase = '' 
)

Set the response status

Parameters
int$statusCodeResponse status code to set
string$reasonPhraseResponse reason phrase
Returns
self
Exceptions
BadResponseExceptionwhen an invalid response code is received

Definition at line 298 of file paymethod/paypal/lib/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Response.php.

References Guzzle\Http\Message\Response\$reasonPhrase, and Guzzle\Http\Message\Response\$statusCode.

Referenced by Guzzle\Http\Message\Response\__construct().

◆ unserialize()

Guzzle\Http\Message\Response::unserialize (   $serialize)

◆ xml()

Guzzle\Http\Message\Response::xml ( )

Parse the XML response body and return a \SimpleXMLElement.

In order to prevent XXE attacks, this method disables loading external entities. If you rely on external entities, then you must parse the XML response manually by accessing the response body directly.

Returns
\SimpleXMLElement
Exceptions
RuntimeExceptionif the response body is not in XML format http://websec.io/2012/08/27/Preventing-XXE-in-PHP.html

Definition at line 893 of file paymethod/paypal/lib/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Response.php.

Field Documentation

◆ $body

◆ $cacheResponseCodes

Guzzle\Http\Message\Response::$cacheResponseCodes = array(200, 203, 206, 300, 301, 410)
staticprotected

◆ $effectiveUrl

string Guzzle\Http\Message\Response::$effectiveUrl
protected

The effective URL that returned this response

Definition at line 111 of file paymethod/paypal/lib/vendor/guzzle/guzzle/src/Guzzle/Http/Message/Response.php.

Referenced by Guzzle\Http\Message\Response\getEffectiveUrl().

◆ $info

array Guzzle\Http\Message\Response::$info = array()
protected

◆ $reasonPhrase

string Guzzle\Http\Message\Response::$reasonPhrase
protected

◆ $statusCode

string Guzzle\Http\Message\Response::$statusCode
protected

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