TYPO3  7.6
Public Member Functions | Static Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
Regex Class Reference
Inheritance diagram for Regex:
ValueInterface

Public Member Functions

 __construct ($pattern, $options= '', $delimiter=null)
 
 __toString ()
 
 render ()
 
 renderPattern ()
 
 isCaseSensitive ()
 
 getType ()
 
 prepend ($expr)
 
 append ($expr)
 
 hasOption ($option)
 
 addOption ($option)
 
 removeOption ($option)
 
 setStartFlag ($startFlag)
 
 hasStartFlag ()
 
 setEndFlag ($endFlag)
 
 hasEndFlag ()
 
 setStartJoker ($startJoker)
 
 hasStartJoker ()
 
 setEndJoker ($endJoker)
 
 hasEndJoker ()
 
 replaceJokers ($replacement)
 

Static Public Member Functions

static create ($expr)
 

Public Attributes

const START_FLAG = '^'
 
const END_FLAG = '$'
 
const BOUNDARY = '~'
 
const JOKER = '.*'
 
const ESCAPING = '\\'
 

Private Member Functions

 parsePattern ($pattern)
 

Private Attributes

 $pattern
 
 $options
 
 $startFlag
 
 $endFlag
 
 $startJoker
 
 $endJoker
 

Detailed Description

Author
Jean-François Simon conta.nosp@m.ct@j.nosp@m.fsimo.nosp@m.n.fr

Definition at line 17 of file Regex.php.

Constructor & Destructor Documentation

__construct (   $pattern,
  $options = '',
  $delimiter = null 
)
Parameters
string$pattern
string$options
string$delimiter

Definition at line 85 of file Regex.php.

References Regex\$options, Regex\$pattern, and Regex\parsePattern().

Member Function Documentation

__toString ( )
Returns
string

Definition at line 99 of file Regex.php.

References Regex\render().

addOption (   $option)
Parameters
string$option
Returns
Regex

Definition at line 178 of file Regex.php.

References Regex\hasOption().

append (   $expr)

{

Parameters
string$expr
Returns
ValueInterface
}

Implements ValueInterface.

Definition at line 156 of file Regex.php.

static create (   $expr)
static
Parameters
string$expr
Returns
Regex
Exceptions
\InvalidArgumentException

Definition at line 62 of file Regex.php.

Referenced by Expression\__construct().

getType ( )

{Returns expression type.

Returns
int
}

Implements ValueInterface.

Definition at line 138 of file Regex.php.

References Expression\TYPE_REGEX.

hasEndFlag ( )
Returns
bool

Definition at line 234 of file Regex.php.

References Regex\$endFlag.

hasEndJoker ( )
Returns
bool

Definition at line 274 of file Regex.php.

References Regex\$endJoker.

hasOption (   $option)
Parameters
string$option
Returns
bool

Definition at line 168 of file Regex.php.

Referenced by Regex\addOption(), and Regex\isCaseSensitive().

hasStartFlag ( )
Returns
bool

Definition at line 214 of file Regex.php.

References Regex\$startFlag.

hasStartJoker ( )
Returns
bool

Definition at line 254 of file Regex.php.

References Regex\$startJoker.

isCaseSensitive ( )

{Returns value case sensitivity.

Returns
bool
}

Implements ValueInterface.

Definition at line 130 of file Regex.php.

References Regex\hasOption().

parsePattern (   $pattern)
private
Parameters
string$pattern

Definition at line 301 of file Regex.php.

References Regex\$pattern.

Referenced by Regex\__construct().

prepend (   $expr)

{

Parameters
string$expr
Returns
ValueInterface
}

Implements ValueInterface.

Definition at line 146 of file Regex.php.

removeOption (   $option)
Parameters
string$option
Returns
Regex

Definition at line 192 of file Regex.php.

render ( )

{Renders string representation of expression.

Returns
string
}

Implements ValueInterface.

Definition at line 107 of file Regex.php.

Referenced by Regex\__toString().

renderPattern ( )

{Renders string representation of pattern.

Returns
string
}

Implements ValueInterface.

Definition at line 118 of file Regex.php.

replaceJokers (   $replacement)
Parameters
array$replacement
Returns
Regex

Definition at line 284 of file Regex.php.

setEndFlag (   $endFlag)
Parameters
bool$endFlag
Returns
Regex

Definition at line 224 of file Regex.php.

References Regex\$endFlag.

setEndJoker (   $endJoker)
Parameters
bool$endJoker
Returns
Regex

Definition at line 264 of file Regex.php.

References Regex\$endJoker.

setStartFlag (   $startFlag)
Parameters
bool$startFlag
Returns
Regex

Definition at line 204 of file Regex.php.

References Regex\$startFlag.

setStartJoker (   $startJoker)
Parameters
bool$startJoker
Returns
Regex

Definition at line 244 of file Regex.php.

References Regex\$startJoker.

Member Data Documentation

$endFlag
private

Definition at line 43 of file Regex.php.

Referenced by Regex\hasEndFlag(), and Regex\setEndFlag().

$endJoker
private

Definition at line 53 of file Regex.php.

Referenced by Regex\hasEndJoker(), and Regex\setEndJoker().

$options
private

Definition at line 33 of file Regex.php.

Referenced by Regex\__construct().

$pattern
private

Definition at line 28 of file Regex.php.

Referenced by Regex\__construct(), and Regex\parsePattern().

$startFlag
private

Definition at line 38 of file Regex.php.

Referenced by Regex\hasStartFlag(), and Regex\setStartFlag().

$startJoker
private

Definition at line 48 of file Regex.php.

Referenced by Regex\hasStartJoker(), and Regex\setStartJoker().

const BOUNDARY = '~'

Definition at line 21 of file Regex.php.

const END_FLAG = '$'

Definition at line 20 of file Regex.php.

const ESCAPING = '\\'

Definition at line 23 of file Regex.php.

const JOKER = '.*'

Definition at line 22 of file Regex.php.

const START_FLAG = '^'

Definition at line 19 of file Regex.php.