Comos\Qpm\Supervision\Config::_fetchIntValue PHP Method

_fetchIntValue() private static method

private static _fetchIntValue ( $config, $field, $defaultValue )
    private static function _fetchIntValue($config, $field, $defaultValue)
    {
        if (!isset($config[$field])) {
            return $defaultValue;
        }
        $v = $config[$field];
        if (is_float($v)) {
            return intval($v);
        } else {
            return $v;
        }
        if (is_string($v)) {
            if (is_numeric($v)) {
                return intval($v);
            }
        }
        throw new \InvalidArgumentException("{$field} must be int");
    }