Exemplo n.º 1
0
 /**
  * Parse config resource and build config array
  *
  * @throws ConfigException
  * @return array Config data array
  */
 protected function getArrayInternal()
 {
     try {
         return $this->yaml->setResource($this->resource)->getArray();
     } catch (\Exception $e) {
         throw new ConfigException($e->getMessage());
     }
 }
Exemplo n.º 2
0
 /**
  * Create Yaml bridge
  *
  * @param mixed $resource
  */
 private function __construct($resource = null)
 {
     if ($this->isInstanceOf(self::$customDriver, self::$driverInterface)) {
         // If custom driver instance was set, we need to use a copy of it and set it's resource
         $this->driverInstance = clone $this->driverInstance->setResource($resource);
     } else {
         $this->driverInstance = new self::$driverClass();
         $this->driverInstance->setResource($resource);
     }
 }