public function __construct($file) { if (!file_exists($file)) { die('File not found' . $file); } $this->_xml = new SimpleXMLElement(file_get_contents($file)); parent::__construct(); }
public function __construct($sitemap_xml_path, $content_xml_path) { if (!file_exists($sitemap_xml_path) || !file_exists($content_xml_path)) { die('File not found'); } $this->_sitemap_xml = new SimpleXMLElement(file_get_contents($sitemap_xml_path)); $this->_content_xml = new SimpleXMLElement(file_get_contents($content_xml_path)); parent::__construct(); }