private function checkValue($value, $values, $reason)
    {

        $ok = in_array($value, $values);
        if (!$ok && !empty($reason)) {
            $this->reason = sprintf($reason, $value);
        }

        return $ok;

    }
private function checkValue($value, $values, $reason)
    {

        $ok = in_array($value, $values);
        if (!$ok && !empty($reason)) {
            $this->reason = sprintf($reason, $value);
        }

        return $ok;

    }
private function checkValue ( $ value , $ values , $ reason ) { $ ok = in_array ( $ value , $ values ) ; if ( ! $ ok && ! empty ( $ reason ) ) { $ this -> reason = sprintf ( $ reason , $ value ) ; } return $ ok ; }
Validate a parameter value from an array of permitted values.

@return boolean True if value is valid
Validate a parameter value from an array of permitted values .