public function __construct($path) { $this->path = $path; if (file_exists($path)) { $this->xml = simplexml_load_string(file_get_contents($path)); } }