public function validateValue($value, array $validValues)
    {
        $result = true;

        if (is_array($value)) {
            $values = $value;
            foreach ($values as $value) {
                $result = $result && in_array($value, $validValues);
            }
        } else {
            $result = in_array($value, $validValues);
        }

        return $result;
    }
public function validateValue($value, array $validValues)
    {
        $result = true;

        if (is_array($value)) {
            $values = $value;
            foreach ($values as $value) {
                $result = $result && in_array($value, $validValues);
            }
        } else {
            $result = in_array($value, $validValues);
        }

        return $result;
    }
public function validateValue ( $ value , array $ validValues ) { $ result = true ; if ( is_array ( $ value ) ) { $ values = $ value ; foreach ( $ values as $ value ) { $ result = $ result && in_array ( $ value , $ validValues ) ; } } else { $ result = in_array ( $ value , $ validValues ) ; } return $ result ; }
Validates if given value is the expected value.

@param mixed $value       The value to validation
@param array $validValues An array of valid values to check given value against

@author Benjamin Carl <opensource@clickalicious.de>

@return bool TRUE if fulfilled requirements, otherwise FALSE
Validates if given value is the expected value .