Public Member Functions | |
| __construct () | |
| addName ($strName, $mixValue=TRUE) | |
| setNameList ($arrNameList) | |
| getNameList () | |
| addRegularExpression ($strtRegularExpression, $mixValue=TRUE) | |
| setRegularExpressionList ($arrRegularExpressionList) | |
| getRegularExpressionList () | |
| setNotFoundValue ($mixNotFoundedValue) | |
| getNotFoundValue () | |
| found ($strName) | |
| isEmpty () | |
| match ($strName) | |
Protected Attributes | |
| $objNameRuleList = null | |
| $objRegexRuleList = null | |
Definition at line 11 of file RuleMatch.class.php.
| __construct | ( | ) |
Definition at line 24 of file RuleMatch.class.php.
00025 { 00026 $this->objNameRuleList = new RuleNameMatch(); 00027 $this->objRegexRuleList = new RuleRegularExpressionMatch(); 00028 }
| addName | ( | $ | strName, | |
| $ | mixValue = TRUE | |||
| ) |
| string | $strName | |
| mixer | $mixValue |
Definition at line 37 of file RuleMatch.class.php.
| addRegularExpression | ( | $ | strtRegularExpression, | |
| $ | mixValue = TRUE | |||
| ) |
| string | $strtRegularExpression | |
| mixer | $mixValue |
Definition at line 71 of file RuleMatch.class.php.
00072 { 00073 $this->objRegexRuleList->addRegularExpression( $strtRegularExpression , $mixValue ); 00074 return $this; 00075 }
| found | ( | $ | strName | ) |
Search the element into the array and returns true if founded and false if not
| string | $strName |
Definition at line 128 of file RuleMatch.class.php.
00129 { 00130 if ( $this->objNameRuleList->found( $strName ) ) 00131 { 00132 return TRUE; 00133 } 00134 else 00135 { 00136 return $this->objRegexRuleList->found( $strName ); 00137 } 00138 }
| getNameList | ( | ) |
Definition at line 58 of file RuleMatch.class.php.
| getNotFoundValue | ( | ) |
RuleRegularExpressionMatch::getNotFoundValue()
Definition at line 116 of file RuleMatch.class.php.
Referenced by match().
| getRegularExpressionList | ( | ) |
| isEmpty | ( | ) |
Returns if the rule is empty
Definition at line 145 of file RuleMatch.class.php.
00146 { 00147 return ( $this->objNameRuleList->isEmpty() && $this->objRegexRuleList->isEmpty() ); 00148 }
| match | ( | $ | strName | ) |
Match the string name
RuleRegularExpressionMatch::match( string )
Definition at line 157 of file RuleMatch.class.php.
References getNotFoundValue().
00158 { 00159 if( $this->objNameRuleList->found( $strName ) ) 00160 { 00161 return $this->objNameRuleList->match( $strName ); 00162 } 00163 if( $this->objRegexRuleList->found($strRegularExpression)) 00164 { 00165 return $this->objNameRuleList->match( $strName ); 00166 } 00167 return $this->getNotFoundValue(); 00168 }
| setNameList | ( | $ | arrNameList | ) |
| array | $arrNameList |
Definition at line 48 of file RuleMatch.class.php.
| setNotFoundValue | ( | $ | mixNotFoundedValue | ) |
Definition at line 104 of file RuleMatch.class.php.
00105 { 00106 $this->objNameRuleList->setNotFoundValue( $mixNotFoundedValue ); 00107 $this->objRegexRuleList->setNotFoundValue( $mixNotFoundedValue ); 00108 return $this; 00109 }
| setRegularExpressionList | ( | $ | arrRegularExpressionList | ) |
| string[] | $arrRegularExpressionList |
Definition at line 82 of file RuleMatch.class.php.
00083 { 00084 $this->objRegexRuleList->setRegularExpressionList( $arrRegularExpressionList ); 00085 return $this; 00086 }
$objNameRuleList = null [protected] |
Definition at line 16 of file RuleMatch.class.php.
$objRegexRuleList = null [protected] |
Definition at line 22 of file RuleMatch.class.php.
1.5.9