5use InvalidArgumentException;
8use Psr\Http\Message\UploadedFileInterface;
36 return $this->request->getPathParams();
39 return $this->request->getQueryParams();
42 return $this->request->getPostParams();
45 throw new InvalidArgumentException( __METHOD__ .
": Invalid source '$source'" );
49 public function hasParam( $name, array $options ) {
51 return isset( $params[$name] );
54 public function getValue( $name, $default, array $options ) {
56 return $params[$name] ?? $default;
62 public function hasUpload( $name, array $options ) {
63 if ( $options[
'source'] !==
'post' ) {
70 if ( $options[
'source'] !==
'post' ) {
73 $upload = $this->request->getUploadedFiles()[$name] ??
null;
74 return $upload instanceof UploadedFileInterface ? $upload :
null;
84 return $this->authority->isAllowed(
'apihighlimits' );