RuleMatchList.class.php

Go to the documentation of this file.
00001 <?php
00002 
00012 class RuleMatchList
00013 {
00018     protected $objIgnoredRuleMatch = null;
00019 
00024     protected $objExclusiveRuleMatch = null;
00025 
00030     protected $mixNotFoundValue = TRUE;
00031 
00032     public function __construct()
00033     {
00034         $this->objIgnoredRuleMatch = new RuleMatch();
00035         $this->objExclusiveRuleMatch = new ruleMatch();
00036     }
00037 
00038     /*
00039      *
00040      * @param RuleMatch $objIgnoredRuleMatch
00041      * @return RuleMatchList me
00042      */
00043     public function setIgnoredRuleMatch( RuleMatch $objIgnoredRuleMatch )
00044     {
00045         $this->objIgnoredRuleMatch = $objIgnoredRuleMatch;
00046         return $this;
00047     }
00048 
00053     public function getIgnoredMatchList()
00054     {
00055         return $this->objIgnoredRuleMatch;
00056     }
00057 
00064     public function addIgnoredName( $strIgnoredName )
00065     {
00066         $this->getIgnoredMatchList()->addName( $strIgnoredName , TRUE );
00067         return $this;
00068     }
00069 
00076     public function addIgnoredRegularExpression( $strIgnoredRegex)
00077     {
00078         $this->getIgnoredMatchList()->addRegularExpression( $strIgnoredRegex, TRUE );
00079         return $this;
00080     }
00081 
00082 
00088     public function setExclusiveRuleMatch( RuleMatch $objExclusiveRuleMatch )
00089     {
00090         $this->objExclusiveRuleMatch = $objExclusiveRuleMatch;
00091         return $this;
00092     }
00093 
00098     public function getExclusiveMatchList()
00099     {
00100         return $this->objExclusiveRuleMatch;
00101     }
00102 
00111     public function addExclusiveName( $strExclusiveName , $mixValue = TRUE )
00112     {
00113         $this->getExclusiveMatchList()->addName( $strExclusiveName , $mixValue);
00114         return $this;
00115     }
00116 
00123     public function addExclusiveRegularExpression( $strExclusiveRegex )
00124     {
00125         return $this;
00126     }
00127 
00134     public function setNotFoundValue( $mixValue )
00135     {
00136         $this->mixNotFoundValue = $mixValue;
00137     }
00138 
00145     public function getNotFoundValue()
00146     {
00147         return $this->mixNotFoundValue;
00148     }
00149 
00156     public function match( $strName )
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     }
00174 }
00175 ?>

Generated on Sat Apr 7 14:19:10 2012 for CodeToDiagram by  doxygen 1.5.9