PHP 클래스 Ouzo\Utilities\RecursiveStrSubstitutor

파일 보기 프로젝트 열기: letsdrink/ouzo 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( array $values = [], null | string $default = null, integer $maxNestLevel = 10 ) Creates recursive substitutor
replace ( string $string ) : mixed Use StrSubstitutor class recursively

메소드 상세

__construct() 공개 메소드

Creates recursive substitutor
public __construct ( array $values = [], null | string $default = null, integer $maxNestLevel = 10 )
$values array
$default null | string
$maxNestLevel integer

replace() 공개 메소드

Example: $strSubstitutor = new RecursiveStrSubstitutor(array('HOST' => '{{URL}}', 'URL' => 'website.foo')); $substituted = $strSubstitutor->replace('Connect with {{HOST}}'); Result: Connect with website.foo
public replace ( string $string ) : mixed
$string string
리턴 mixed