Méthode | Description | |
---|---|---|
__construct ( array $values = [], null | string $default = null, integer $maxNestLevel = 10 ) | Creates recursive substitutor | |
replace ( string $string ) : mixed | Use StrSubstitutor class recursively |
$strSubstitutor = new RecursiveStrSubstitutor(array('HOST' => '{{URL}}', 'URL' => 'website.foo'));
$substituted = $strSubstitutor->replace('Connect with {{HOST}}');
Result:
Connect with website.foo