Illuminate\Foundation\ProviderRepository::compileManifest PHP Method

compileManifest() protected method

Compile the application manifest file.
protected compileManifest ( Illuminate\Foundation\Application $app, array $providers ) : array
$app Illuminate\Foundation\Application
$providers array
return array
    protected function compileManifest(Application $app, $providers)
    {
        // The service manifest should contain a list of all of the providers for
        // the application so we can compare it on each request to the service
        // and determine if the manifest should be recompiled or is current.
        $manifest = $this->freshManifest($providers);
        foreach ($providers as $provider) {
            $instance = $this->createProvider($app, $provider);
            // When recompiling the service manifest, we will spin through each of the
            // providers and check if it's a deferred provider or not. If so we'll
            // add it's provided services to the manifest and note the provider.
            if ($instance->isDeferred()) {
                foreach ($instance->provides() as $service) {
                    $manifest['deferred'][$service] = $provider;
                }
            } else {
                $manifest['eager'][] = $provider;
            }
        }
        return $this->writeManifest($manifest);
    }