PHP Класс IdiormString, idiorm

Автор: Jeff Roberson ([email protected])
Автор: Simon Holywell ([email protected])
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$replace
$search
$subject

Открытые методы

Метод Описание
__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

Защищенные методы

Метод Описание
_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

Описание методов

__construct() публичный Метод

Set the base string object
public __construct ( string $subject )
$subject string

_str_replace_outside_quotes() защищенный Метод

Validate an input string and perform a replace on all ocurrences of $this->search with $this->replace
Автор: Jeff Roberson ([email protected])
protected _str_replace_outside_quotes ( ) : string
Результат string

_str_replace_outside_quotes_cb() защищенный Метод

Process each matching chunk from preg_replace_callback replacing each occurrence of $this->search with $this->replace
Автор: Jeff Roberson ([email protected])
protected _str_replace_outside_quotes_cb ( array $matches ) : string
$matches array
Результат string

replace_outside_quotes() публичный Метод

Replace all occurrences of the search string with the replacement string where they appear outside quotes
public replace_outside_quotes ( string $search, string $replace ) : string
$search string
$replace string
Результат string

str_replace_outside_quotes() публичный статический Метод

Shortcut method: Replace all occurrences of the search string with the replacement string where they appear outside quotes.
public static str_replace_outside_quotes ( string $search, string $replace, string $subject ) : string
$search string
$replace string
$subject string
Результат string

value() публичный статический Метод

Get an easy to use instance of the class
public static value ( string $subject ) : self
$subject string
Результат self

Описание свойств

$replace защищенное свойство

protected $replace

$subject защищенное свойство

protected $subject