ILIAS
release_8 Revision v8.19
|
Public Member Functions | |
__construct ($open_in_new_tab=true) | |
transform ($from) | |
Perform the transformation. More... | |
![]() | |
applyTo (Result $result) | |
Perform the transformation and reify possible failures. More... | |
__invoke ($from) | |
Transformations should be callable. More... | |
Protected Member Functions | |
additionalAttributes () | |
Private Member Functions | |
replaceMatches (string $from, callable $replace) | |
regexPos (string $regexp, string $string) | |
requireString ($maybeHTML) | |
shouldReplace (string $maybeHTML, int $startOfMatch, int $endOfMatch) | |
match (string $pattern, string $haystack) | |
replace (string $url, string $protocol) | |
Private Attributes | |
const | URL_PATTERN = '(^|[^[:alnum:]])(((https?:\/\/)|(www.))[^[:cntrl:][:space:]<>\'"]+)([^[:alnum:]]|$)' |
bool | $open_in_new_tab |
Definition at line 29 of file MakeClickable.php.
ILIAS\Refinery\String\MakeClickable::__construct | ( | $open_in_new_tab = true | ) |
Definition at line 38 of file MakeClickable.php.
References ILIAS\Refinery\String\MakeClickable\$open_in_new_tab.
|
protected |
Definition at line 124 of file MakeClickable.php.
Referenced by ILIAS\Refinery\String\MakeClickable\replace().
|
private |
string | $pattern | Pattern without delimiters. |
Definition at line 107 of file MakeClickable.php.
Referenced by ILIAS\Refinery\String\MakeClickable\regexPos(), ILIAS\Refinery\String\MakeClickable\replaceMatches(), and ILIAS\Refinery\String\MakeClickable\shouldReplace().
|
private |
Definition at line 74 of file MakeClickable.php.
References ILIAS\Refinery\String\MakeClickable\match().
Referenced by ILIAS\Refinery\String\MakeClickable\shouldReplace().
|
private |
Definition at line 113 of file MakeClickable.php.
References ILIAS\Refinery\String\MakeClickable\additionalAttributes().
Referenced by ILIAS\Refinery\String\MakeClickable\transform().
|
private |
Definition at line 54 of file MakeClickable.php.
References ILIAS\Refinery\String\MakeClickable\match().
Referenced by ILIAS\Refinery\String\MakeClickable\transform().
|
private |
mixed | $maybeHTML |
Definition at line 88 of file MakeClickable.php.
Referenced by ILIAS\Refinery\String\MakeClickable\transform().
|
private |
Definition at line 95 of file MakeClickable.php.
References ILIAS\Refinery\String\MakeClickable\match(), and ILIAS\Refinery\String\MakeClickable\regexPos().
Referenced by ILIAS\Refinery\String\MakeClickable\transform().
ILIAS\Refinery\String\MakeClickable::transform | ( | $from | ) |
Perform the transformation.
Please use this for transformations. It's more performant than calling invoke.
mixed | $from |
InvalidArgumentException | if the argument could not be transformed |
Implements ILIAS\Refinery\Transformation.
Definition at line 43 of file MakeClickable.php.
References $url, ILIAS\Refinery\String\MakeClickable\replace(), ILIAS\Refinery\String\MakeClickable\replaceMatches(), ILIAS\Refinery\String\MakeClickable\requireString(), and ILIAS\Refinery\String\MakeClickable\shouldReplace().
|
private |
Definition at line 36 of file MakeClickable.php.
Referenced by ILIAS\Refinery\String\MakeClickable\__construct().
|
private |
Definition at line 34 of file MakeClickable.php.