Property | Type | Description | |
---|---|---|---|
$replace | |||
$search | |||
$subject |
Method | Description | |
---|---|---|
__construct ( string $subject ) | Set the base string object | |
replace_outside_quotes ( string $search, string $replace ) : string | Replace all occurrences of the search string with the replacement string where they appear outside quotes | |
str_replace_outside_quotes ( string $search, string $replace, string $subject ) : string | Shortcut method: Replace all occurrences of the search string with the replacement string where they appear outside quotes. | |
value ( string $subject ) : self | Get an easy to use instance of the class |
Method | Description | |
---|---|---|
_str_replace_outside_quotes ( ) : string | Validate an input string and perform a replace on all ocurrences of $this->search with $this->replace | |
_str_replace_outside_quotes_cb ( array $matches ) : string | Process each matching chunk from preg_replace_callback replacing each occurrence of $this->search with $this->replace |
public __construct ( string $subject ) | ||
$subject | string |
protected _str_replace_outside_quotes ( ) : string | ||
return | string |
protected _str_replace_outside_quotes_cb ( array $matches ) : string | ||
$matches | array | |
return | string |