Exemple #1
0
 public function __construct($filePath)
 {
     parent::__construct();
     $file_content = $this->loadFile($filePath);
     $previous = libxml_use_internal_errors(true);
     $elem = simplexml_load_string($file_content);
     libxml_use_internal_errors($previous);
     if (false === $elem) {
         throw new XmlErrorException(libxml_get_last_error());
     }
     $this->document = $elem;
 }
Exemple #2
0
 public function __construct($filePath)
 {
     parent::__construct();
     $this->config = (array) Yaml::parse($this->loadFile($filePath));
 }