Example #1
0
 public function load($path)
 {
     if (!class_exists('Tale\\Dom\\Parser')) {
         throw new Exception("Failed to load XML config: Please install the " . "`talesoft/tale-dom` package");
     }
     return $this->getOptionsFromElement(Element::fromFile($path));
 }
Example #2
0
 public static function fromFile($path, $encoding = null, $html = false)
 {
     if ($html) {
         return HtmlElement::fromFile($path, $encoding);
     }
     return Element::fromFile($path, $encoding);
 }