diff --git a/src/Platform/Action.php b/src/Platform/Action.php index c4f9069..a47cdcc 100644 --- a/src/Platform/Action.php +++ b/src/Platform/Action.php @@ -168,7 +168,7 @@ public function getParams(): array * @param array $injections * @return self */ - public function param(string $key, mixed $default, Validator|callable $validator, string $description = '', bool $optional = false, array $injections = []): self + public function param(string $key, mixed $default, Validator|callable $validator, string $description = '', bool $optional = false, array $injections = [], bool $skipValidation = false): self { $param = [ 'default' => $default, @@ -176,6 +176,7 @@ public function param(string $key, mixed $default, Validator|callable $validator 'description' => $description, 'optional' => $optional, 'injections' => $injections, + 'skipValidation' => $skipValidation, ]; $this->options['param:'.$key] = array_merge($param, ['type' => 'param']); $this->params[$key] = $param; diff --git a/src/Platform/Platform.php b/src/Platform/Platform.php index f9711b7..6236552 100644 --- a/src/Platform/Platform.php +++ b/src/Platform/Platform.php @@ -115,7 +115,7 @@ protected function initHttp(array $services): void switch ($option['type']) { case 'param': $key = substr($key, stripos($key, ':') + 1); - $hook->param($key, $option['default'], $option['validator'], $option['description'], $option['optional'], $option['injections']); + $hook->param($key, $option['default'], $option['validator'], $option['description'], $option['optional'], $option['injections'], $option['skipValidation']); break; case 'injection': $hook->inject($option['name']); @@ -165,7 +165,7 @@ protected function initTasks(array $services): void switch ($option['type']) { case 'param': $key = substr($key, stripos($key, ':') + 1); - $hook->param($key, $option['default'], $option['validator'], $option['description'], $option['optional'], $option['injections']); + $hook->param($key, $option['default'], $option['validator'], $option['description'], $option['optional'], $option['injections'], $option['skipValidation']); break; case 'injection': $hook->inject($option['name']); @@ -222,7 +222,7 @@ protected function initWorker(array $services, string $workerName): void switch ($option['type']) { case 'param': $key = substr($key, stripos($key, ':') + 1); - $hook->param($key, $option['default'], $option['validator'], $option['description'], $option['optional'], $option['injections']); + $hook->param($key, $option['default'], $option['validator'], $option['description'], $option['optional'], $option['injections'], $option['skipValidation']); break; case 'injection': $hook->inject($option['name']);