PHP 클래스 Jasny\Twig\PcreExtension

저자: Arnold Daniels ([email protected])
상속: extends Twig_Extension
파일 보기 프로젝트 열기: jasny/twig-extensions

공개 메소드들

메소드 설명
__construct ( ) Class constructor
filter ( string $value, string $pattern, string $replacement = '', integer $limit ) : string Perform a regular expression search and replace, returning only matched subjects.
get ( string $value, string $pattern, $group ) : string Perform a regular expression match and return a matched group.
getAll ( string $value, string $pattern, $group ) : array Perform a regular expression match and return the group for all matches.
getFilters ( ) Callback for Twig
getName ( ) : string Return extension name
grep ( array $values, string $pattern, strign $flags = '' ) : array Perform a regular expression match and return an array of entries that match the pattern
match ( string $value, string $pattern ) : boolean Perform a regular expression match.
quote ( string $value, string $delimiter = '/' ) : string Quote regular expression characters.
replace ( string $value, string $pattern, string $replacement = '', integer $limit ) : string Perform a regular expression search and replace.
split ( string $value, string $pattern ) : array Split text into an array using a regular expression.

보호된 메소드들

메소드 설명
assertNoEval ( string $pattern ) Check that the regex doesn't use the eval modifier

메소드 상세

__construct() 공개 메소드

Class constructor
public __construct ( )

assertNoEval() 보호된 메소드

Check that the regex doesn't use the eval modifier
protected assertNoEval ( string $pattern )
$pattern string

filter() 공개 메소드

Perform a regular expression search and replace, returning only matched subjects.
public filter ( string $value, string $pattern, string $replacement = '', integer $limit ) : string
$value string
$pattern string
$replacement string
$limit integer
리턴 string

get() 공개 메소드

Perform a regular expression match and return a matched group.
public get ( string $value, string $pattern, $group ) : string
$value string
$pattern string
리턴 string

getAll() 공개 메소드

Perform a regular expression match and return the group for all matches.
public getAll ( string $value, string $pattern, $group ) : array
$value string
$pattern string
리턴 array

getFilters() 공개 메소드

Callback for Twig
public getFilters ( )

getName() 공개 메소드

Return extension name
public getName ( ) : string
리턴 string

grep() 공개 메소드

Perform a regular expression match and return an array of entries that match the pattern
public grep ( array $values, string $pattern, strign $flags = '' ) : array
$values array
$pattern string
$flags strign Optional 'invert' to return entries that do not match the given pattern.
리턴 array

match() 공개 메소드

Perform a regular expression match.
public match ( string $value, string $pattern ) : boolean
$value string
$pattern string
리턴 boolean

quote() 공개 메소드

Quote regular expression characters.
public quote ( string $value, string $delimiter = '/' ) : string
$value string
$delimiter string
리턴 string

replace() 공개 메소드

Perform a regular expression search and replace.
public replace ( string $value, string $pattern, string $replacement = '', integer $limit ) : string
$value string
$pattern string
$replacement string
$limit integer
리턴 string

split() 공개 메소드

Split text into an array using a regular expression.
public split ( string $value, string $pattern ) : array
$value string
$pattern string
리턴 array