Illuminate\Foundation\ProviderRepository::loadManifest PHP Method

loadManifest() public method

Load the service provider manifest JSON file.
public loadManifest ( ) : array
return array
    public function loadManifest()
    {
        $path = $this->manifestPath . '/services.json';
        if (!$this->isSae) {
            // The service manifest is a file containing a JSON representation of every
            // service provided by the application and whether its provider is using
            // deferred loading or should be eagerly loaded on each request to us.
            if ($this->files->exists($path)) {
                return json_decode($this->files->get($path), true);
            }
        } else {
            // if we runs on SAE, using memcache instead of local filesystem
            $key = 'manifest_' . md5($path);
            if ($manifest = $this->memcache->get($key)) {
                return $manifest;
            }
        }
    }

Usage Example

Beispiel #1
0
 /**
  * It's entirely possible with this approach that the manifest is empty. As a result,
  * we should return the default array if no manifest is found.
  *
  * @return array
  */
 public function loadManifest()
 {
     $manifest = parent::loadManifest();
     if (!$manifest) {
         $manifest = $this->default;
     }
     return $manifest;
 }