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; }
public function __construct($filePath) { parent::__construct(); $this->config = (array) Yaml::parse($this->loadFile($filePath)); }