Nette\DI\Config\Adapters\PhpAdapter::load PHP Method

load() public method

Reads configuration from PHP file.
public load ( $file ) : array
return array
    public function load($file)
    {
        return require $file;
    }

Usage Example

Esempio n. 1
0
 /**
  * @return mixed
  */
 private function &getPackageConfig()
 {
     if ($this->packageConfig === null) {
         $config = new PhpAdapter();
         if (!is_file($this->getPackageConfigPath())) {
             @mkdir(dirname($this->getPackageConfigPath()));
             file_put_contents($this->getPackageConfigPath(), $config->dump(array()));
         }
         $this->packageConfig = $config->load($this->getPackageConfigPath());
     }
     return $this->packageConfig;
 }
PhpAdapter