proxifyPluginAction
extends wrapper
in package
Extending the wrapper class.
Table of Contents
- $url_pattern : string|null
- A property that is used to filter the events.
- $base_url : string
- It's a private variable that is used to store the base url of the request.
- clean_content_type() : string
- It's getting the content type of the response.
- onBeforeSend() : void
- A function that is called before the request is sent to the server.
- onCache() : void
- A method that is called when the event `EVENT_BUILD_CACHE` is triggered.
- onCheck() : self
- Used to check if the event should be executed.
- onComplete() : void
- It's a function that is called after the request is completed.
- onContext() : void
- A method that is called when the event `EVENT_BUILD_CONTEXT` is triggered.
- onException() : void
- Used to execute code when an exception is thrown.
- onFinal() : void
- Used to execute code when the request is completed.
- onHeaders() : void
- A method that is called when the event `EVENT_BUILD_HEADERS` is triggered.
- onIncludes() : void
- A method that is called when the event `EVENT_BUILD_INCLUDES` is triggered.
- onRequest() : void
- A method that is called when the event `EVENT_BUILD_REQUEST` is triggered.
- onSend() : void
- Used to execute code when the request is sent.
- onSent() : void
- Used to execute code before the request is sent.
- onWrite() : void
- Used to execute code when the headers are received.
- subscribe() : void
- Subscribing to all the events.
- css_import() : array<string|int, mixed>|string
- It's replacing the `@import` in the CSS with the proxified url.
- css_url() : array<string|int, mixed>|string
- It's replacing the `url()` in the CSS with the proxified url.
- form_action() : array<string|int, mixed>|string
- It's replacing the `action` attribute in the `<form>` tag with the proxified url.
- html_attr() : array<string|int, mixed>|string
- It's replacing the `src` and `href` attributes in the HTML with the proxified url.
- meta_refresh() : array<string|int, mixed>|string
- It's replacing the `content` attribute in the `<meta>` tag with the proxified url.
- proxify_css() : array<string|int, mixed>|string|null
- It's replacing the `url()` in the CSS with the proxified url.
- proxify_head() : array<string|int, mixed>|string|null
- It's replacing the `<head>` tag with the `<head>` tag.
- route() : void
- A method that is used to route the events to the appropriate methods.
Properties
$url_pattern
A property that is used to filter the events.
protected
string|null
$url_pattern
= null
$base_url
It's a private variable that is used to store the base url of the request.
private
string
$base_url
= CHAR_EMPTY_STRING
Methods
clean_content_type()
It's getting the content type of the response.
public
clean_content_type(mixed $content_type) : string
Parameters
- $content_type : mixed
Return values
string —onBeforeSend()
A function that is called before the request is sent to the server.
public
onBeforeSend() : void
Return values
void —onCache()
A method that is called when the event `EVENT_BUILD_CACHE` is triggered.
public
onCache() : void
Return values
void —onCheck()
Used to check if the event should be executed.
public
onCheck() : self
Return values
self —onComplete()
It's a function that is called after the request is completed.
public
onComplete() : void
Return values
void —onContext()
A method that is called when the event `EVENT_BUILD_CONTEXT` is triggered.
public
onContext() : void
Return values
void —onException()
Used to execute code when an exception is thrown.
public
onException(Exception $e) : void
Parameters
- $e : Exception
Return values
void —onFinal()
Used to execute code when the request is completed.
public
onFinal() : void
Return values
void —onHeaders()
A method that is called when the event `EVENT_BUILD_HEADERS` is triggered.
public
onHeaders() : void
Return values
void —onIncludes()
A method that is called when the event `EVENT_BUILD_INCLUDES` is triggered.
public
onIncludes() : void
Return values
void —onRequest()
A method that is called when the event `EVENT_BUILD_REQUEST` is triggered.
public
onRequest() : void
Return values
void —onSend()
Used to execute code when the request is sent.
public
onSend() : void
Return values
void —onSent()
Used to execute code before the request is sent.
public
onSent() : void
Return values
void —onWrite()
Used to execute code when the headers are received.
public
onWrite() : void
Return values
void —subscribe()
Subscribing to all the events.
public
final subscribe(yP $dispatcher) : void
Parameters
- $dispatcher : yP
Return values
void —css_import()
It's replacing the `@import` in the CSS with the proxified url.
private
css_import(mixed $matches) : array<string|int, mixed>|string
Parameters
- $matches : mixed
Return values
array<string|int, mixed>|string —css_url()
It's replacing the `url()` in the CSS with the proxified url.
private
css_url(mixed $matches) : array<string|int, mixed>|string
Parameters
- $matches : mixed
Return values
array<string|int, mixed>|string —form_action()
It's replacing the `action` attribute in the `<form>` tag with the proxified url.
private
form_action(mixed $matches) : array<string|int, mixed>|string
Parameters
- $matches : mixed
Return values
array<string|int, mixed>|string —html_attr()
It's replacing the `src` and `href` attributes in the HTML with the proxified url.
private
html_attr(mixed $matches) : array<string|int, mixed>|string
Parameters
- $matches : mixed
Return values
array<string|int, mixed>|string —meta_refresh()
It's replacing the `content` attribute in the `<meta>` tag with the proxified url.
private
meta_refresh(mixed $matches) : array<string|int, mixed>|string
Parameters
- $matches : mixed
Return values
array<string|int, mixed>|string —proxify_css()
It's replacing the `url()` in the CSS with the proxified url.
private
proxify_css(mixed $str) : array<string|int, mixed>|string|null
Parameters
- $str : mixed
Return values
array<string|int, mixed>|string|null —proxify_head()
It's replacing the `<head>` tag with the `<head>` tag.
private
proxify_head(mixed $str) : array<string|int, mixed>|string|null
Parameters
- $str : mixed
Return values
array<string|int, mixed>|string|null —route()
A method that is used to route the events to the appropriate methods.
private
route(string $event_name) : void
Parameters
- $event_name : string