PHP Class Devise\Support\Str

Afficher le fichier Open project: devisephp/cms

Méthodes publiques

Méthode Description
replaceBetween ( string $haystack, string $needle, Closure $replacementMethod ) : string Replace the $needle strings within the $haystack with whatever the $replacementMethod tells us. Replacement method will be given a $between variable

Méthodes protégées

Méthode Description
closetag ( string $str ) : char Gets the closing tag for a string
escaped ( string $str ) : integer Gets escaped string. If the string has '\' char then it is considered to be escaped.
opentag ( string $str ) : char Gets opening tag for a string

Method Details

closetag() protected méthode

Gets the closing tag for a string
protected closetag ( string $str ) : char
$str string
Résultat char

escaped() protected méthode

..
protected escaped ( string $str ) : integer
$str string
Résultat integer

opentag() protected méthode

Gets opening tag for a string
protected opentag ( string $str ) : char
$str string
Résultat char

replaceBetween() public méthode

Usage: replaceBetween('something @here(...) and @here(...)', '@here', function($between) { return "[ $between ]";" }); Returns something [ ... ] and [ ... ] This method is used by Devise\Pages\Docs\LiveSpan.
public replaceBetween ( string $haystack, string $needle, Closure $replacementMethod ) : string
$haystack string
$needle string
$replacementMethod Closure
Résultat string