name = $name; $this->handler = $handler; } public function getName(): string { return $this->name; } public function call(Context $context): PromiseInterface { return new Promise(function (callable $resolve) use ($context) { $args = $context->toMethodParameters($this->handler); $resolve(call_user_func($this->handler, ...$args)); //$resolve(call_user_func($this->handler, $context)); return; }); } }