providers = $providers; } public function __invoke() { $container = new Container(new Pimple\Container()); foreach ($this->providers as $provider) { /** @var ProviderInterface $instance */ $instance = new $provider(); $instance->register($container); } return ApplicationContext::setContainer($container); } }