container = $container; } /** * Execute the given API action class, pass the input and return its response. * * @param User $actor * @param string $actionClass * @param array $input * @return object */ public function send(User $actor, $actionClass, array $input = []) { /** @var \Flarum\Api\Actions\JsonApiAction $action */ $action = $this->container->make($actionClass); $response = $action->handle(new Request($input, $actor)); return json_decode($response->getBody()); } }