RuleMatch Class Reference

List of all members.

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


Detailed Description

Definition at line 11 of file RuleMatch.class.php.


Constructor & Destructor Documentation

__construct (  ) 

Definition at line 24 of file RuleMatch.class.php.

00025     {
00026         $this->objNameRuleList = new RuleNameMatch();
00027         $this->objRegexRuleList = new RuleRegularExpressionMatch();
00028     }


Member Function Documentation

addName ( strName,
mixValue = TRUE 
)

See also:
RuleNameMatch::addName( string , mixer )
Parameters:
string $strName
mixer $mixValue
Returns:
RuleMatch

Definition at line 37 of file RuleMatch.class.php.

00038     {
00039         $this->objNameRuleList->addName( $strName , $mixValue );
00040         return $this;
00041     }

addRegularExpression ( strtRegularExpression,
mixValue = TRUE 
)

See also:
RuleNameMatch::addtRegularExpression( string , mixer )
Parameters:
string $strtRegularExpression
mixer $mixValue
Returns:
RuleMatch

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

Parameters:
string $strName
Returns:
boolean

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 (  ) 

See also:
RuleNameMatch::getNameList()
Returns:
string[]

Definition at line 58 of file RuleMatch.class.php.

00059     {
00060         return $this->objNameRuleList->getNameList();
00061     }

getNotFoundValue (  ) 

See also:
RuleNameMatch::getNotFoundValue()

RuleRegularExpressionMatch::getNotFoundValue()

Returns:
mixer

Definition at line 116 of file RuleMatch.class.php.

Referenced by match().

00117     {
00118         return $this->objNameRuleList->getNotFoundedValue();
00119     }

getRegularExpressionList (  ) 

See also:
RuleRegularExpressionMatch::getRegularExpressionList()
Returns:
string[]

Definition at line 93 of file RuleMatch.class.php.

00094     {
00095         return $this->objRegexRuleList->getRegularExpressionList();
00096     }

isEmpty (  ) 

Returns if the rule is empty

Returns:
boolean

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

See also:
RuleNameMatch::match( string )

RuleRegularExpressionMatch::match( string )

Returns:
mixer

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  ) 

See also:
RuleNameMatch::setNameList( string[] )
Parameters:
array $arrNameList
Returns:
RuleMatch

Definition at line 48 of file RuleMatch.class.php.

00049     {
00050         $this->objNameRuleList->setNameList( $arrNameList );
00051         return $this;
00052     }

setNotFoundValue ( mixNotFoundedValue  ) 

See also:
RuleNameMatch::setNotFoundValue()

RuleRegularExpressionMatch::setNotFoundValue()

Returns:
RuleMatch

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  ) 

See also:
RuleRegularExpressionMatch::setRegularExpressionList( string[] )
Parameters:
string[] $arrRegularExpressionList
Returns:
RuleMatch

Definition at line 82 of file RuleMatch.class.php.

00083     {
00084         $this->objRegexRuleList->setRegularExpressionList( $arrRegularExpressionList );
00085         return $this;
00086     }


Member Data Documentation

$objNameRuleList = null [protected]

RuleNameMatch

Definition at line 16 of file RuleMatch.class.php.

$objRegexRuleList = null [protected]

RuleRegularExpressionMatch

Definition at line 22 of file RuleMatch.class.php.


The documentation for this class was generated from the following file:

Generated on Thu Feb 3 03:55:04 2011 for CodeToDiagram by  doxygen 1.5.9