ICanBoogie
  • Documentation
  • API Reference
  • HTTP v2.5.0
Namespaces
  • ICanBoogie
    • Exception
    • HTTP
      • Headers
      • Request
      • RequestDispatcher
Classes
  • CallableDispatcher
  • File
  • FileInfo
  • FileList
  • FileResponse
  • Headers
  • RedirectResponse
  • Request
  • RequestDispatcher
  • RequestRange
  • Response
  • Status
  • WeightedDispatcher
Interfaces
  • Dispatcher
  • Exception
  • SecurityError
Exceptions
  • AuthenticationRequired
  • ClientError
  • DispatcherNotDefined
  • ForceRedirect
  • MethodNotSupported
  • NotFound
  • PermissionRequired
  • ServerError
  • ServiceUnavailable
  • StatusCodeNotValid

Class RedirectResponse

A HTTP response doing a redirect.

ICanBoogie\HTTP\Response uses ICanBoogie\Accessor\AccessorTrait (not available)
┗ ICanBoogie\HTTP\RedirectResponse
Namespace: ICanBoogie\HTTP
Located at RedirectResponse.php

Methods summary

public __construct( string $url, integer $status = Status::FOUND, array $headers = [] )

Initializes the Location header.

Initializes the Location header.

Parameters

$url
URL to redirect to.
$status
Status code (default to Status::FOUND).
$headers
Additional headers.

Throws

InvalidArgumentException
if the provided status code is not a redirect.

Overrides

ICanBoogie\HTTP\Response::__construct

Methods inherited from ICanBoogie\HTTP\Response

__clone(), __invoke(), __toString(), assert_body_is_valid(), finalize(), get_age(), get_body(), get_cache_control(), get_content_length(), get_content_type(), get_date(), get_etag(), get_expires(), get_is_cacheable(), get_is_fresh(), get_is_validateable(), get_last_modified(), get_location(), get_status(), get_ttl(), send_body(), send_headers(), set_age(), set_body(), set_cache_control(), set_content_length(), set_content_type(), set_date(), set_etag(), set_expires(), set_last_modified(), set_location(), set_status(), set_ttl()

Properties summary

Properties inherited from ICanBoogie\HTTP\Response

$headers, $version

Magic properties inherited from ICanBoogie\HTTP\Response

$age, $body, $cache_control, $content_length, $content_type, $date, $etag, $expires, $is_cacheable, $is_fresh, $is_private, $is_validateable, $last_modified, $location, $status, $ttl

HTTP v2.5.0 – Check on GitHub – API documentation generated by ApiGen