It's extending the wrapper class.
- Full name:
\yxorP\plugin\headerRewritePluginAction
- Parent class:
\yxorP\lib\http\wrapper
It's setting the accept-encoding
header to identity
and removing the referer
header.
public onBeforeSend(): void
It's checking if the response has a location
header and if it does, it's proxifying the URL.
public onSent(): void
It's proxifying the URL of the location
header.
public static headersReceived(mixed $response, mixed $request_url): void
- This method is static.
Parameters:
Parameter | Type | Description |
---|---|---|
$response |
mixed | |
$request_url |
mixed |
Subscribing to all the events.
final public subscribe(\yxorP\lib\yP $dispatcher): void
- This method is final.
Parameters:
Parameter | Type | Description |
---|---|---|
$dispatcher |
\yxorP\lib\yP |
A method that is used to route the events to the appropriate methods.
private route(string $event_name): void
Parameters:
Parameter | Type | Description |
---|---|---|
$event_name |
string |
A method that is called when the event EVENT_BUILD_CACHE
is triggered.
public onCache(): void
Used to check if the event should be executed.
public onCheck(): self
A method that is called when the event EVENT_BUILD_CONTEXT
is triggered.
public onContext(): void
A method that is called when the event EVENT_BUILD_INCLUDES
is triggered.
public onIncludes(): void
A method that is called when the event EVENT_BUILD_HEADERS
is triggered.
public onHeaders(): void
A method that is called when the event EVENT_BUILD_REQUEST
is triggered.
public onRequest(): void
Used to build the result.
public onBeforeSend(): void
Used to execute code when the request is sent.
public onSend(): void
Used to execute code before the request is sent.
public onSent(): void
Used to execute code when the headers are received.
public onWrite(): void
Used to execute code when the headers are received.
public onComplete(): void
Used to execute code when the request is completed.
public onFinal(): void
Used to execute code when an exception is thrown.
public onException(\Exception $e): void
Parameters:
Parameter | Type | Description |
---|---|---|
$e |
\Exception |