container = $container; $this->service = $service; } /** * * Invokes the closure to create the instance. * * @return object The object created by the closure. * */ public function __invoke() { return $this->container->get($this->service); } }