/**
  * Load the environment variables for the given environment.
  *
  * @param  string  $environment
  * @return array
  */
 public function load($environment = null)
 {
     if ($environment == 'production') {
         $environment = null;
     }
     if (!$this->files->exists($path = $this->getFile($environment))) {
         return array();
     } else {
         return $this->files->getRequire($path);
     }
 }
예제 #2
0
 /**
  * Load the service provider manifest PHP file.
  *
  * @return array
  */
 public function loadManifest()
 {
     // The service manifest is a file containing a 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($this->manifestPath)) {
         $manifest = $this->files->getRequire($this->manifestPath);
         return array_merge(array('when' => array()), $manifest);
     }
 }