Autarky\Application::registerProviders PHP Method

registerProviders() protected method

Register all of the application's service providers.
protected registerProviders ( ) : void
return void
    protected function registerProviders()
    {
        $dependants = [];
        foreach ($this->providers as $provider) {
            if (is_string($provider)) {
                $provider = new $provider();
            }
            $this->registerProvider($provider);
            if ($provider instanceof DependantProviderInterface) {
                $dependants[] = $provider;
            }
        }
        foreach ($dependants as $dependant) {
            $this->checkProviderDependencies($dependant);
        }
    }