eee
This commit is contained in:
@@ -664,6 +664,21 @@ class Request implements ServerRequestInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $name
|
||||||
|
* @param int $default
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
|
public function queryInt(string $name, int $default = 0): int
|
||||||
|
{
|
||||||
|
$data = $this->getQueryParams();
|
||||||
|
if (!isset($data[$name])) {
|
||||||
|
return (int)$data[$name];
|
||||||
|
}
|
||||||
|
return $default;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return an instance with the specified body parameters.
|
* Return an instance with the specified body parameters.
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user