Example #1
0
 /**
  * It includes the config file with the config values, and save them in the calculated_values property, taking care of inheritance.
  *
  * @param string $environment The environment where you are in.
  * @param File $file A file handler to work with the filesystem.
  */
 public function __construct($environment, $file)
 {
     if (empty($file)) {
         throw new PHPConfigException('A file handler is needed.');
     }
     $this->environment = $environment;
     $this->config_values = $file->requireFile();
     $this->calculated_values = $this->getConfigFromEnvironment($environment);
 }