Cml\Http\Input::postInt PHP Метод

postInt() публичный статический Метод

获取post int数据
public static postInt ( string $name, null $default = null ) : integer | null
$name string 要获取的变量
$default null 未获取到$_POST值时返回的默认值
Результат integer | null
    public static function postInt($name, $default = null)
    {
        if (isset($_POST[$name]) && $_POST[$name] !== '') {
            return intval($_POST[$name]);
        }
        return is_null($default) ? null : intval($default);
    }