LinkSanitizer
in package
This class replaces any links from Cloudrexx < 3.0 on the fly.
Handles the [[NODE_<ID>_<LANGID>]] placeholders.
Tags
Table of Contents
Constants
- ATTRIBUTE_AND_OPEN_QUOTE = 1
- CLOSE_QUOTE = 4
- FILE_PATH = 3
Properties
Methods
- __construct() : mixed
- replace() : mixed
- Calculates and returns the content with all replacements done.
- appendParameters() : string
- Callback method for appending preview and appview parameter to href and action attributes.
- getPath() : string
- Returns the created path by the given array.
Constants
ATTRIBUTE_AND_OPEN_QUOTE
public
mixed
ATTRIBUTE_AND_OPEN_QUOTE
= 1
CLOSE_QUOTE
public
mixed
CLOSE_QUOTE
= 4
FILE_PATH
public
mixed
FILE_PATH
= 3
Properties
$content
protected
mixed
$content
$cx
protected
mixed
$cx
$offset
protected
mixed
$offset
Methods
__construct()
public
__construct(mixed $cx, string $offset, mixed &$content) : mixed
Parameters
- $cx : mixed
- $offset : string
-
the path offset to prepend, e.g. '/' or '/cms/'
- $content : mixed
replace()
Calculates and returns the content with all replacements done.
public
replace() : mixed
appendParameters()
Callback method for appending preview and appview parameter to href and action attributes.
private
appendParameters(array<string|int, mixed> $matches) : string
Parameters
- $matches : array<string|int, mixed>
-
regex matches
Tags
Return values
string —replacement string
getPath()
Returns the created path by the given array.
private
getPath(array<string|int, mixed> $matches) : string
Parameters
- $matches : array<string|int, mixed>
Return values
string —created path