PHP Class Kraken\Util\Support\StringSupport

Mostra file Open project: kraken-php/framework Class Usage Examples

Public Methods

Method Description
find ( string | string[] $pattern, string[] $entries ) : string[] Filter and return entries that match any of specified patterns.
findFew ( string[] $patterns, string[] $entries ) : string[] Filter and return entries that match any of specified patterns.
findOne ( string $pattern, string[] $entries ) : string[] Filter and return entries that match specified pattern.
match ( string $pattern, string $string ) : boolean Check if string matches pattern using simple regexp method.
parametrize ( string $str, string[] $params ) : string Parametrize string using array of params.

Method Details

find() public static method

Filter and return entries that match any of specified patterns.
public static find ( string | string[] $pattern, string[] $entries ) : string[]
$pattern string | string[]
$entries string[]
return string[]

findFew() public static method

Filter and return entries that match any of specified patterns.
public static findFew ( string[] $patterns, string[] $entries ) : string[]
$patterns string[]
$entries string[]
return string[]

findOne() public static method

Filter and return entries that match specified pattern.
public static findOne ( string $pattern, string[] $entries ) : string[]
$pattern string
$entries string[]
return string[]

match() public static method

Check if string matches pattern using simple regexp method.
public static match ( string $pattern, string $string ) : boolean
$pattern string
$string string
return boolean

parametrize() public static method

Parametrize string using array of params.
public static parametrize ( string $str, string[] $params ) : string
$str string
$params string[]
return string