public function __construct($xml) { if (str::is_path($xml)) { if (str::is_url($xml)) { $r = remote::get($xml); $this->data = $r['content']; } else { $this->data = file_get_contents($xml); } } else { $this->data = $xml; } if (empty($this->data)) { return false; } unset($xml, $r, $fp); }