Markup
in package
Statically hold all found markups (e.g. inline styles) in a single object instance to be memory-low instead of saving the markup string in each blocked result.
Table of Contents
Properties
Methods
- __toString() : mixed
- `toString`. Allow grouping with e.g. `array_unique`.
- get() : mixed
- Get the markup instance for a given ID (the MD5 hash of the markup).
- getContent() : mixed
- Getter.
- getId() : mixed
- Getter.
- persist() : mixed
- Persist a markup in pool or return the existing one.
- __construct() : mixed
- C'tor.
Properties
$content
private
mixed
$content
$id
private
mixed
$id
$pool
Pool.
private
static array<string|int, Markup>
$pool
= []
Methods
__toString()
`toString`. Allow grouping with e.g. `array_unique`.
public
__toString() : mixed
get()
Get the markup instance for a given ID (the MD5 hash of the markup).
public
static get(string $id) : mixed
Parameters
- $id : string
getContent()
Getter.
public
getContent() : mixed
Tags
getId()
Getter.
public
getId() : mixed
Tags
persist()
Persist a markup in pool or return the existing one.
public
static persist(string $markup) : mixed
Parameters
- $markup : string
__construct()
C'tor.
private
__construct(string $id, string $content) : mixed
Parameters
- $id : string
- $content : string