Пример #1
0
 /**
  * Get the specified configuration value of the virtual host object
  *
  * @param string $key
  *
  * @param bool   $default
  *
  * @return mixed
  */
 public function get($key = null, $default = false)
 {
     if (($default || !$this->configRepository->has('apache.' . $key)) && $this->configRepository->has('default.' . $key)) {
         return $this->configRepository->get('default.' . $key);
     }
     if ($this->configRepository->has('apache.' . $key)) {
         return $this->configRepository->get('apache.' . $key);
     }
     return $this->configRepository->all();
 }
Пример #2
0
 public function testReturnFalseIfArrayIsEmptyOrKeyIsNull()
 {
     $configRepository = new Repository([]);
     $this->assertNotTrue($configRepository->has('name'));
 }