Overview
  • Namespace
  • Class
  • Tree

Namespaces

  • Modulework
    • Modules
      • Http
        • Exceptions
        • Utilities
  • PHP

Classes

  • Cookie
  • JsonResponse
  • RedirectResponse
  • Request
  • Response

Class RedirectResponse

Redirect-Response A HTTP header redirect

Modulework\Modules\Http\Response
Extended by Modulework\Modules\Http\RedirectResponse
Namespace: Modulework\Modules\Http
Located at Modulework/Modules/Http/RedirectResponse.php

Methods summary

public static Modulework\Modules\Http\JsonResponse
# make( string $url = null, integer $code = 302, array $headers = array(), Modulework\Modules\Http\Utilities\HeaderWrapperInterface $headerWrapper = null )

Factory for the Response object

Factory for the Response object

Parameters

$url
string
$content The target URL
$code
integer
$code The HTTP status code (302 = default)
$headers
array
$headers The HTTP headers (Location header is done automagical)
$headerWrapper
Modulework\Modules\Http\Utilities\HeaderWrapperInterface
| null $headerWrapper The wrapper for PHP' s native header releated functions

Returns

Modulework\Modules\Http\JsonResponse
The new RedirectResponse object

Throws

InvalidArgumentException
(from Constructor)

Overrides

Modulework\Modules\Http\Response::make
public Modulework\Modules\Http\RedirectResponse
# __construct( string $url = null, integer $code = 302, array $headers = array(), Modulework\Modules\Http\Utilities\HeaderWrapperInterface $headerWrapper = null )

Constructor.

Constructor.

Parameters

$url
string
$content The target URL
$code
integer
$code The HTTP status code
$headers
array
$headers The HTTP headers
$headerWrapper
Modulework\Modules\Http\Utilities\HeaderWrapperInterface
| null $headerWrapper The wrapper for PHP' s native header releated functions

Returns

Modulework\Modules\Http\RedirectResponse
The new RedirectResponse object

Throws

InvalidArgumentException
[(from setContent, setUrl)]

Overrides

Modulework\Modules\Http\Response::__construct
public Modulework\Modules\Http\RedirectResponse
# setUrl( string $url )

Set the target URL

Set the target URL

Parameters

$url
string
$url The target URL

Returns

Modulework\Modules\Http\RedirectResponse
THIS

Throws

InvalidArgumentException
[(from setContent)]
public string
# getUrl( )

Returns the target URL

Returns the target URL

Returns

string
The target URL
public Modulework\Modules\Http\RedirectResponse
# withCookie( Modulework\Modules\Http\Cookie $cookie )

Send a cookie along the redirect

Send a cookie along the redirect

Parameters

$cookie
Modulework\Modules\Http\Cookie
$cookie The cookie to send

Returns

Modulework\Modules\Http\RedirectResponse
THIS

Uses

Modulework\Modules\Http\Response::addCookie()

Methods inherited from Modulework\Modules\Http\Response

__toString(), addCookie(), addHeader(), appendContent(), fromException(), getCharset(), getContent(), getDate(), getExpires(), getProtocolVersion(), getStatusCode(), isClientError(), isEmpty(), isForbidden(), isInformational(), isInvalid(), isNotFound(), isOk(), isRedirect(), isServerError(), isSuccess(), prepare(), send(), sendContent(), sendCookies(), sendHeaders(), setCharset(), setContent(), setDate(), setExpires(), setHeaderWrapper(), setProtocolVersion(), setStatusCode(), validateContent()

Magic methods summary

Properties summary

protected mixed $url
#

Properties inherited from Modulework\Modules\Http\Response

$charset, $content, $cookies, $headerWrapper, $headers, $protocolVersion, $statusCode, $statusCodeRegistry, $statusText

API documentation generated by ApiGen 2.8.0