diff --git a/src/Controller/Commands/Command.php b/src/Controller/Commands/Command.php new file mode 100644 index 0000000..19c52e6 --- /dev/null +++ b/src/Controller/Commands/Command.php @@ -0,0 +1,68 @@ +name; + } + + /** + * @return array + */ + public function getMandatoryParameters(): array + { + return $this->mandatoryParameters; + } + + /** + * @return array + */ + public function getOptionalParameters(): array + { + return $this->optionalParameters; + } + + /** + * @return string|null + */ + public function getDescription(): ?string + { + return $this->description; + } + + /** + * @return Closure + */ + public function getCallback(): Closure + { + return $this->callback; + } + + public function exec(): void + { + call_user_func(callback: $this->callback); + } +} \ No newline at end of file