
Public Member Functions | |
| __construct () | |
| setMatchName (MatchName $objMatchName) | |
| getMatchName () | |
| setMatchRegularExpression (MatchRegularExpression $objMatchName) | |
| getMatchRegularExpression () | |
| setNotFoundValue ($objNotFoundValue) | |
| getNotFoundValue () | |
| addItemName ($strItemName, $objValue=null) | |
| addItemRegularExpression ($strItemRegex, $objValue=null) | |
| match ($strName) | |
| found ($strName) | |
| isEmpty () | |
Protected Attributes | |
| $objMatchName | |
| $objMatchRegularExpression | |
| $objNotFoundValue = false | |
Definition at line 32 of file MatchGroup.class.php.
| __construct | ( | ) |
constructor of the group
Definition at line 59 of file MatchGroup.class.php.
00060 { 00061 $this->objMatchName = new MatchName(); 00062 $this->objMatchRegularExpression = new MatchRegularExpression(); 00063 }
| addItemName | ( | $ | strItemName, | |
| $ | objValue = null | |||
| ) |
proxy to add item into the match name
| string | $strItemName | |
| object | $objValue |
Definition at line 140 of file MatchGroup.class.php.
References getMatchName().
00141 { 00142 $this->getMatchName()->addItem( $strItemName , $objValue ); 00143 return $this; 00144 }
| addItemRegularExpression | ( | $ | strItemRegex, | |
| $ | objValue = null | |||
| ) |
proxy to add item into the match regular expression
| string | $strItemRegex | |
| object | $objValue |
Definition at line 153 of file MatchGroup.class.php.
References getMatchRegularExpression().
00154 { 00155 $this->getMatchRegularExpression()->addItem( $strItemRegex , $objValue ); 00156 return $this; 00157 }
| found | ( | $ | strName | ) |
Found the name into the match group
| string | $strName |
Implements MatchInterface.
Definition at line 185 of file MatchGroup.class.php.
References getMatchName(), and getMatchRegularExpression().
Referenced by match().
00186 { 00187 return 00188 ( 00189 ( $this->getMatchName()->found( $strName ) ) 00190 || 00191 ( $this->getMatchRegularExpression()->found( $strName ) ) 00192 ); 00193 }
| getMatchName | ( | ) |
Get the match name
Definition at line 82 of file MatchGroup.class.php.
Referenced by addItemName(), found(), isEmpty(), match(), and setNotFoundValue().
| getMatchRegularExpression | ( | ) |
Get the match regular expression
Definition at line 104 of file MatchGroup.class.php.
Referenced by addItemRegularExpression(), found(), isEmpty(), match(), and setNotFoundValue().
| getNotFoundValue | ( | ) |
Get the not found value
Implements MatchInterface.
Definition at line 128 of file MatchGroup.class.php.
Referenced by match().
| isEmpty | ( | ) |
Inform if the match inside the group are empty
Definition at line 200 of file MatchGroup.class.php.
References getMatchName(), and getMatchRegularExpression().
00201 { 00202 return 00203 ( 00204 ( $this->getMatchName()->isEmpty() ) 00205 && 00206 ( $this->getMatchRegularExpression()->isEmpty() ) 00207 ); 00208 }
| match | ( | $ | strName | ) |
Match the string name
MatchRegularExpression::match( string )
Implements MatchInterface.
Definition at line 166 of file MatchGroup.class.php.
References found(), getMatchName(), getMatchRegularExpression(), and getNotFoundValue().
00167 { 00168 if( $this->getMatchName()->found( $strName ) ) 00169 { 00170 return $this->getMatchName()->match( $strName ); 00171 } 00172 if( $this->getMatchRegularExpression()->found( $strName ) ) 00173 { 00174 return $this->getMatchRegularExpression()->match( $strName ); 00175 } 00176 return $this->getNotFoundValue(); 00177 }
| setMatchName | ( | MatchName $ | objMatchName | ) |
Set the match name
| MatchName | $objMatchName |
Definition at line 71 of file MatchGroup.class.php.
00072 { 00073 $this->objMatchName = $objMatchName; 00074 return $this; 00075 }
| setMatchRegularExpression | ( | MatchRegularExpression $ | objMatchName | ) |
Set the match regular expression
| MatchName | $objMatchRegularExpression |
Definition at line 93 of file MatchGroup.class.php.
References $objMatchRegularExpression.
00094 { 00095 $this->objMatchRegularExpression = $objMatchRegularExpression; 00096 return $this; 00097 }
| setNotFoundValue | ( | $ | objNotFoundValue | ) |
Set the not found value
| object | $objValue |
Implements MatchInterface.
Definition at line 115 of file MatchGroup.class.php.
References $objNotFoundValue, getMatchName(), and getMatchRegularExpression().
00116 { 00117 $this->objNotFoundValue = $objNotFoundValue; 00118 $this->getMatchName()->setNotFoundValue( $objNotFoundValue ); 00119 $this->getMatchRegularExpression()->setNotFoundValue( $objNotFoundValue ); 00120 return $this; 00121 }
$objMatchName [protected] |
$objMatchRegularExpression [protected] |
Match Regular Expression of the group
Definition at line 46 of file MatchGroup.class.php.
Referenced by setMatchRegularExpression().
$objNotFoundValue = false [protected] |
Object to be return when the received <name> unmatch in the match() method
object
Definition at line 54 of file MatchGroup.class.php.
Referenced by setNotFoundValue().
1.5.9