ICanBoogie
  • Documentation
  • API Reference
  • HTTP 3.0.x
Namespaces
  • ICanBoogie
    • Exception
    • HTTP
      • Headers
      • Request
      • RequestDispatcher
Classes
  • AlterEvent
  • BeforeDispatchEvent
  • DispatchEvent

Class BeforeDispatchEvent

Event class for the ICanBoogie\HTTP\RequestDispatcher::dispatch:before event.

Event hooks may use this event to provide a response to the request before the domain dispatchers are invoked. The event is usually used by event hooks to redirect requests or provide cached responses.

ICanBoogie\Event
┗ ICanBoogie\HTTP\RequestDispatcher\BeforeDispatchEvent
Namespace: ICanBoogie\HTTP\RequestDispatcher
Located at RequestDispatcher/BeforeDispatchEvent.php

Methods summary

protected get_request( void ) : ICanBoogie\HTTP\Request

Returns

ICanBoogie\HTTP\Request
protected get_response( void ) : ICanBoogie\HTTP\Response|null

Returns

ICanBoogie\HTTP\Response|null
protected set_response( ICanBoogie\HTTP\Response $response = null )

Parameters

$response
public __construct( ICanBoogie\HTTP\RequestDispatcher $target, ICanBoogie\HTTP\Request $request, ICanBoogie\HTTP\Response & $response = null )

The event is constructed with the type dispatch:before.

The event is constructed with the type dispatch:before.

Parameters

$target
$request
$response
Reference to the response.

Constants summary

TYPE : string
'dispatch:before'

Properties summary

Magic properties

public $response : ICanBoogie\HTTP\Response
public read-only $request : ICanBoogie\HTTP\Request
HTTP 3.0.x – Check on GitHub – API documentation generated by ApiGen