ILIAS
trunk Revision v11.0_alpha-1866-gfa368f7776e
|
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 28 of file MakeClickable.php.
ILIAS\Refinery\String\MakeClickable::__construct | ( | $open_in_new_tab = true | ) |
Definition at line 37 of file MakeClickable.php.
References ILIAS\Refinery\String\MakeClickable\$open_in_new_tab.
|
protected |
Definition at line 123 of file MakeClickable.php.
Referenced by ILIAS\Refinery\String\MakeClickable\replace().
|
private |
string | $pattern | Pattern without delimiters. |
Definition at line 106 of file MakeClickable.php.
References null.
Referenced by ILIAS\Refinery\String\MakeClickable\regexPos(), ILIAS\Refinery\String\MakeClickable\replaceMatches(), and ILIAS\Refinery\String\MakeClickable\shouldReplace().
|
private |
Definition at line 73 of file MakeClickable.php.
References ILIAS\Refinery\String\MakeClickable\match(), and null.
Referenced by ILIAS\Refinery\String\MakeClickable\shouldReplace().
|
private |
Definition at line 112 of file MakeClickable.php.
References ILIAS\Refinery\String\MakeClickable\additionalAttributes().
Referenced by ILIAS\Refinery\String\MakeClickable\transform().
|
private |
Definition at line 53 of file MakeClickable.php.
References ILIAS\Refinery\String\MakeClickable\match(), and null.
Referenced by ILIAS\Refinery\String\MakeClickable\transform().
|
private |
mixed | $maybeHTML |
Definition at line 87 of file MakeClickable.php.
Referenced by ILIAS\Refinery\String\MakeClickable\transform().
|
private |
Definition at line 94 of file MakeClickable.php.
References ILIAS\Refinery\String\MakeClickable\match(), null, 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 42 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 35 of file MakeClickable.php.
Referenced by ILIAS\Refinery\String\MakeClickable\__construct().
|
private |
Definition at line 33 of file MakeClickable.php.