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

  • AbstractEntityBodyDecorator
  • CachingEntityBody
  • Client
  • EntityBody
  • IoEmittingEntityBody
  • Mimetypes
  • QueryString
  • ReadLimitEntityBody
  • RedirectPlugin
  • Url

Interfaces

  • ClientInterface
  • EntityBodyInterface
  • Overview
  • Namespace
  • Class
  • Tree
  • Todo

Class RedirectPlugin

Plugin to implement HTTP redirects. Can redirect like a web browser or using strict RFC 2616 compliance

Guzzle\Http\RedirectPlugin implements Symfony\Component\EventDispatcher\EventSubscriberInterface
Namespace: Guzzle\Http
Located at Guzzle/Http/RedirectPlugin.php
Methods summary
public static array
# getSubscribedEvents( )

Returns an array of event names this subscriber wants to listen to.

Returns an array of event names this subscriber wants to listen to.

Returns

array
The event names to listen to

Implementation of

Symfony\Component\EventDispatcher\EventSubscriberInterface::getSubscribedEvents()
public
# onRequestClone( Guzzle\Common\Event $event )

Clean up the parameters of a request when it is cloned

Clean up the parameters of a request when it is cloned

Parameters

$event
Guzzle\Common\Event
$event Event emitted
public
# onRequestSent( Guzzle\Common\Event $event )

Called when a request receives a redirect response

Called when a request receives a redirect response

Parameters

$event
Guzzle\Common\Event
$event Event emitted
protected Guzzle\Http\Message\RequestInterface
# createRedirectRequest( Guzzle\Http\Message\RequestInterface $request, Guzzle\Http\Message\RequestInterface $statusCode, integer $location, Guzzle\Http\Message\RequestInterface $original )

Create a redirect request for a specific request object

Create a redirect request for a specific request object

Takes into account strict RFC compliant redirection (e.g. redirect POST with POST) vs doing what most clients do (e.g. redirect POST with GET).

Parameters

$request
Guzzle\Http\Message\RequestInterface
$request Request being redirected
$statusCode
Guzzle\Http\Message\RequestInterface
$original Original request
$location
integer
$statusCode Status code of the redirect
$original
string
$location Location header of the redirect

Returns

Guzzle\Http\Message\RequestInterface
Returns a new redirect request

Throws

Guzzle\Http\Exception\CouldNotRewindStreamException
If the body needs to be rewound but cannot
protected Guzzle\Http\Message\RequestInterface
# cloneRequestWithGetMethod( Guzzle\Http\Message\EntityEnclosingRequestInterface $request )

Clone a request while changing the method to GET. Emulates the behavior of Guzzle\Http\Message\Request::clone, but can change the HTTP method.

Clone a request while changing the method to GET. Emulates the behavior of Guzzle\Http\Message\Request::clone, but can change the HTTP method.

Parameters

$request
Guzzle\Http\Message\EntityEnclosingRequestInterface
$request Request to clone

Returns

Guzzle\Http\Message\RequestInterface
Returns a GET request
protected Guzzle\Http\Message\RequestInterface
# prepareRedirection( Guzzle\Http\Message\RequestInterface $request )

Prepare the request for redirection and enforce the maximum number of allowed redirects per client

Prepare the request for redirection and enforce the maximum number of allowed redirects per client

Parameters

$request
Guzzle\Http\Message\RequestInterface
$request Request to prepare and validate

Returns

Guzzle\Http\Message\RequestInterface
Returns the original request
protected
# throwTooManyRedirectsException( Guzzle\Http\Message\RequestInterface $request )

Throw a too many redirects exception for a request

Throw a too many redirects exception for a request

Parameters

$request
Guzzle\Http\Message\RequestInterface
$request Request

Throws

Guzzle\Http\Exception\TooManyRedirectsException
when too many redirects have been issued
Constants summary
string REDIRECT_COUNT 'redirect.count'
#
string MAX_REDIRECTS 'redirect.max'
#
string STRICT_REDIRECTS 'redirect.strict'
#
string PARENT_REQUEST 'redirect.parent_request'
#
string DISABLE 'redirect.disable'
#
Properties summary
protected integer $defaultMaxRedirects 5
#

Default number of redirects allowed when no setting is supplied by a request

Default number of redirects allowed when no setting is supplied by a request

php-coveralls API documentation generated by ApiGen 2.8.0