private function __verify($strValue)
    {
        $blnReturn = false;
        $strLowerValue = strtolower($strValue);
        $strCompareAgainst = (is_string($this->__value)) ? strtolower($this->__value) : null;

        switch ($this->__comparison) {
            case ValidForm::VFORM_COMPARISON_EQUAL:
                $blnReturn = ($strLowerValue == $strCompareAgainst);
                break;
            case ValidForm::VFORM_COMPARISON_NOT_EQUAL:
                $blnReturn = ($strLowerValue != $strCompareAgainst);
                break;
            case ValidForm::VFORM_COMPARISON_LESS_THAN:
                $blnReturn = ($strValue < $this->__value);
                break;
            case ValidForm::VFORM_COMPARISON_GREATER_THAN:
                $blnReturn = ($strValue > $this->__value);
                break;
            case ValidForm::VFORM_COMPARISON_LESS_THAN_OR_EQUAL:
                $blnReturn = ($strValue <= $this->__value);
                break;
            case ValidForm::VFORM_COMPARISON_GREATER_THAN_OR_EQUAL:
                $blnReturn = ($strValue >= $this->__value);
                break;
            case ValidForm::VFORM_COMPARISON_EMPTY:
                $blnReturn = empty($strValue);
                break;
            case ValidForm::VFORM_COMPARISON_NOT_EMPTY:
                $blnReturn = ! empty($strValue);
                break;
            case ValidForm::VFORM_COMPARISON_STARTS_WITH:
                // strpos is faster than substr and way faster than preg_match.
                $blnReturn = (strpos($strLowerValue, $strCompareAgainst) === 0);
                break;
            case ValidForm::VFORM_COMPARISON_ENDS_WITH:
                $blnReturn = (substr($strLowerValue, - strlen($strCompareAgainst)) === $strCompareAgainst);
                break;
            case ValidForm::VFORM_COMPARISON_CONTAINS:
                $blnReturn = (strpos($strLowerValue, $strCompareAgainst) !== false);
                break;
            case ValidForm::VFORM_COMPARISON_REGEX:
                $blnReturn = preg_match($this->__value, $strValue);
                break;
            case ValidForm::VFORM_COMPARISON_IN_ARRAY:
                $blnReturn = in_array($strValue, $this->__value);
                break;
            case ValidForm::VFORM_COMPARISON_NOT_IN_ARRAY:
                $blnReturn = !in_array($strValue, $this->__value);
                break;
        }

        return $blnReturn;
    }
private function __verify($strValue)
    {
        $blnReturn = false;
        $strLowerValue = strtolower($strValue);
        $strCompareAgainst = (is_string($this->__value)) ? strtolower($this->__value) : null;

        switch ($this->__comparison) {
            case ValidForm::VFORM_COMPARISON_EQUAL:
                $blnReturn = ($strLowerValue == $strCompareAgainst);
                break;
            case ValidForm::VFORM_COMPARISON_NOT_EQUAL:
                $blnReturn = ($strLowerValue != $strCompareAgainst);
                break;
            case ValidForm::VFORM_COMPARISON_LESS_THAN:
                $blnReturn = ($strValue < $this->__value);
                break;
            case ValidForm::VFORM_COMPARISON_GREATER_THAN:
                $blnReturn = ($strValue > $this->__value);
                break;
            case ValidForm::VFORM_COMPARISON_LESS_THAN_OR_EQUAL:
                $blnReturn = ($strValue <= $this->__value);
                break;
            case ValidForm::VFORM_COMPARISON_GREATER_THAN_OR_EQUAL:
                $blnReturn = ($strValue >= $this->__value);
                break;
            case ValidForm::VFORM_COMPARISON_EMPTY:
                $blnReturn = empty($strValue);
                break;
            case ValidForm::VFORM_COMPARISON_NOT_EMPTY:
                $blnReturn = ! empty($strValue);
                break;
            case ValidForm::VFORM_COMPARISON_STARTS_WITH:
                // strpos is faster than substr and way faster than preg_match.
                $blnReturn = (strpos($strLowerValue, $strCompareAgainst) === 0);
                break;
            case ValidForm::VFORM_COMPARISON_ENDS_WITH:
                $blnReturn = (substr($strLowerValue, - strlen($strCompareAgainst)) === $strCompareAgainst);
                break;
            case ValidForm::VFORM_COMPARISON_CONTAINS:
                $blnReturn = (strpos($strLowerValue, $strCompareAgainst) !== false);
                break;
            case ValidForm::VFORM_COMPARISON_REGEX:
                $blnReturn = preg_match($this->__value, $strValue);
                break;
            case ValidForm::VFORM_COMPARISON_IN_ARRAY:
                $blnReturn = in_array($strValue, $this->__value);
                break;
            case ValidForm::VFORM_COMPARISON_NOT_IN_ARRAY:
                $blnReturn = !in_array($strValue, $this->__value);
                break;
        }

        return $blnReturn;
    }
private function __verify ( $ strValue ) { $ blnReturn = false ; $ strLowerValue = strtolower ( $ strValue ) ; $ strCompareAgainst = ( is_string ( $ this -> __value ) ) ? strtolower ( $ this -> __value ) : null ; switch ( $ this -> __comparison ) { case ValidForm :: VFORM_COMPARISON_EQUAL : $ blnReturn = ( $ strLowerValue == $ strCompareAgainst ) ; break ; case ValidForm :: VFORM_COMPARISON_NOT_EQUAL : $ blnReturn = ( $ strLowerValue != $ strCompareAgainst ) ; break ; case ValidForm :: VFORM_COMPARISON_LESS_THAN : $ blnReturn = ( $ strValue < $ this -> __value ) ; break ; case ValidForm :: VFORM_COMPARISON_GREATER_THAN : $ blnReturn = ( $ strValue > $ this -> __value ) ; break ; case ValidForm :: VFORM_COMPARISON_LESS_THAN_OR_EQUAL : $ blnReturn = ( $ strValue <= $ this -> __value ) ; break ; case ValidForm :: VFORM_COMPARISON_GREATER_THAN_OR_EQUAL : $ blnReturn = ( $ strValue >= $ this -> __value ) ; break ; case ValidForm :: VFORM_COMPARISON_EMPTY : $ blnReturn = empty ( $ strValue ) ; break ; case ValidForm :: VFORM_COMPARISON_NOT_EMPTY : $ blnReturn = ! empty ( $ strValue ) ; break ; case ValidForm :: VFORM_COMPARISON_STARTS_WITH : // strpos is faster than substr and way faster than preg_match. $ blnReturn = ( strpos ( $ strLowerValue , $ strCompareAgainst ) === 0 ) ; break ; case ValidForm :: VFORM_COMPARISON_ENDS_WITH : $ blnReturn = ( substr ( $ strLowerValue , - strlen ( $ strCompareAgainst ) ) === $ strCompareAgainst ) ; break ; case ValidForm :: VFORM_COMPARISON_CONTAINS : $ blnReturn = ( strpos ( $ strLowerValue , $ strCompareAgainst ) !== false ) ; break ; case ValidForm :: VFORM_COMPARISON_REGEX : $ blnReturn = preg_match ( $ this -> __value , $ strValue ) ; break ; case ValidForm :: VFORM_COMPARISON_IN_ARRAY : $ blnReturn = in_array ( $ strValue , $ this -> __value ) ; break ; case ValidForm :: VFORM_COMPARISON_NOT_IN_ARRAY : $ blnReturn = ! in_array ( $ strValue , $ this -> __value ) ; break ; } return $ blnReturn ; }
Verify this comparison against the actual value

@param string $strValue The actual value that is submitted
@return boolean True if comparison succeeded, false if not.
Verify this comparison against the actual value