26 private $conditions = [];
32 public function __construct( array $params, array $files = [] ) {
33 $this->params = $params;
34 $this->files = $files;
38 public function hasParam( $name, array $options ) {
39 return isset( $this->params[$name] );
43 public function getValue( $name, $default, array $options ) {
44 return $this->params[$name] ?? $default;
48 public function hasUpload( $name, array $options ) {
49 return isset( $this->files[$name] );
54 $file = $this->files[$name] ??
null;
57 $this->files[$name] = $file;
67 $this->conditions[] = [
68 'message' => $message,
71 'settings' => $settings,
80 return $this->conditions;
87 $this->conditions = [];
92 return !empty( $options[
'useHighLimits'] );