root/components/ruleMatchList/RuleRegularExpressionMatch.class.php

118119
110
     * Search the element into the array and returns true if founded
110
     * Search the element into the array and returns true if founded
111
     * and false if not
111
     * and false if not
112
     *
112
     *
113
     * @param string $strRegularExpression
113
     * @param string $strName
114
     * @return boolean
114
     * @return boolean
115
     */
115
     */
116
    public function found( $strRegularExpression )
116
    public function found( $strName )
117
    {
117
    {
118
        if ( in_array( $strRegularExpression , $this->arrRegularExpressionList ) )
118
        foreach( $this->arrRegularExpressionList  as $intRegularExpressionKey => $strRegularExpression )
119
        {
119
        {
120
            return TRUE;
120
            if( ereg( $strRegularExpression , $strName ) )
121
            {
122
                return TRUE;
123
            }
121
        }
124
        }
122
        else
125
123
        {
126
        return FALSE;
124
            return FALSE;
125
        }
126
    }
127
    }
127
128
128
    /**
129
    /**
130
     * Returns if the rule is empty
131
     *
132
     * @return boolean
133
     */
134
    public function isEmpty()
135
    {
136
        return ( sizeof( $this->arrRegularExpressionList ) == 0 );
137
    }
138
139
140
    /**
129
     * Match the string RegularExpression
141
     * Match the string RegularExpression
130
     *
142
     *
131
     * @param string $strRegularExpression
143
     * @param string $strRegularExpression