RuleMatchList Class Reference

List of all members.

Public Member Functions

 __construct ()
 setIgnoredRuleMatch (RuleMatch $objIgnoredRuleMatch)
 getIgnoredMatchList ()
 addIgnoredName ($strIgnoredName)
 addIgnoredRegularExpression ($strIgnoredRegex)
 setExclusiveRuleMatch (RuleMatch $objExclusiveRuleMatch)
 getExclusiveMatchList ()
 addExclusiveName ($strExclusiveName, $mixValue=TRUE)
 addExclusiveRegularExpression ($strExclusiveRegex)
 setNotFoundValue ($mixValue)
 getNotFoundValue ()
 match ($strName)

Protected Attributes

 $objIgnoredRuleMatch = null
 $objExclusiveRuleMatch = null
 $mixNotFoundValue = TRUE


Detailed Description

Definition at line 12 of file RuleMatchList.class.php.


Constructor & Destructor Documentation

__construct (  ) 

Definition at line 32 of file RuleMatchList.class.php.

00033     {
00034         $this->objIgnoredRuleMatch = new RuleMatch();
00035         $this->objExclusiveRuleMatch = new ruleMatch();
00036     }


Member Function Documentation

addExclusiveName ( strExclusiveName,
mixValue = TRUE 
)

add a exclusive name into the rule

See also:
RuleMatch::addName( string , mixer )
Parameters:
string $strExclusiveName
mixer $mixValue value of the element. Beware!
Returns:
RuleMatchList me

Definition at line 111 of file RuleMatchList.class.php.

References getExclusiveMatchList().

00112     {
00113         $this->getExclusiveMatchList()->addName( $strExclusiveName , $mixValue);
00114         return $this;
00115     }

addExclusiveRegularExpression ( strExclusiveRegex  ) 

See also:
RuleMatch::addRegularExpression( string , mixer )
Parameters:
string $strIgnoreName
Returns:
RuleMatchList me

Definition at line 123 of file RuleMatchList.class.php.

00124     {
00125         return $this;
00126     }

addIgnoredName ( strIgnoredName  ) 

See also:
RuleMatch::addName( string , mixer )
Parameters:
string $strIgnoredName
Returns:
RuleMatchList me

Definition at line 64 of file RuleMatchList.class.php.

References getIgnoredMatchList().

00065     {
00066         $this->getIgnoredMatchList()->addName( $strIgnoredName , TRUE );
00067         return $this;
00068     }

addIgnoredRegularExpression ( strIgnoredRegex  ) 

See also:
RuleMatch::addRegularExpression( string , mixer )
Parameters:
string $strIgnoreName
Returns:
RuleMatchList me

Definition at line 76 of file RuleMatchList.class.php.

References getIgnoredMatchList().

00077     {
00078         $this->getIgnoredMatchList()->addRegularExpression( $strIgnoredRegex, TRUE );
00079         return $this;
00080     }

getExclusiveMatchList (  ) 

Returns:
RuleMatch

Definition at line 98 of file RuleMatchList.class.php.

Referenced by addExclusiveName(), and match().

00099     {
00100         return $this->objExclusiveRuleMatch;
00101     }

getIgnoredMatchList (  ) 

Returns:
RuleMatch

Definition at line 53 of file RuleMatchList.class.php.

Referenced by addIgnoredName(), addIgnoredRegularExpression(), and match().

00054     {
00055         return $this->objIgnoredRuleMatch;
00056     }

getNotFoundValue (  ) 

Get the value what shoul be return when the name not be found into any list

Returns:
mixer

Definition at line 145 of file RuleMatchList.class.php.

Referenced by match().

00146     {
00147         return $this->mixNotFoundValue;
00148     }

match ( strName  ) 

Match the string name

Parameters:
string $strName
Returns:
mixer

Definition at line 156 of file RuleMatchList.class.php.

References getExclusiveMatchList(), getIgnoredMatchList(), and getNotFoundValue().

00157     {
00158         if( $this->getExclusiveMatchList()->isEmpty() == FALSE )
00159         {
00160             return ( $this->getExclusiveMatchList()->match( $strName ) );
00161         }
00162         else
00163         {
00164             if( $this->getIgnoredMatchList()->isEmpty() == FALSE )
00165             {
00166                 if( $this->getIgnoredMatchList()->found( $strName ) )
00167                 {
00168                     return FALSE;
00169                 }
00170             }
00171         }
00172         return $this->getNotFoundValue();
00173     }

setExclusiveRuleMatch ( RuleMatch objExclusiveRuleMatch  ) 

Parameters:
RuleMatch $objExclusiveRuleMatch
Returns:
RuleMatchList me

Definition at line 88 of file RuleMatchList.class.php.

00089     {
00090         $this->objExclusiveRuleMatch = $objExclusiveRuleMatch;
00091         return $this;
00092     }

setIgnoredRuleMatch ( RuleMatch objIgnoredRuleMatch  ) 

Definition at line 43 of file RuleMatchList.class.php.

00044     {
00045         $this->objIgnoredRuleMatch = $objIgnoredRuleMatch;
00046         return $this;
00047     }

setNotFoundValue ( mixValue  ) 

Set the value what should be return when the name not be found into any list

Parameters:
mixer $mixValue

Definition at line 134 of file RuleMatchList.class.php.

00135     {
00136         $this->mixNotFoundValue = $mixValue;
00137     }


Member Data Documentation

$mixNotFoundValue = TRUE [protected]

mixer

Definition at line 30 of file RuleMatchList.class.php.

$objExclusiveRuleMatch = null [protected]

RuleMatch

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

$objIgnoredRuleMatch = null [protected]

RuleMatch

Definition at line 18 of file RuleMatchList.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