/** * Constructor * * @param \DOMDocument|string $input The data to parse. A string of HTML or a DOMDocument * @param \Jkphl\Utility\Url|\string $url Optional: The URL of the parsed document, for relative URL resolution */ public function __construct($input, $url = null) { $this->_url = $url instanceof \Jkphl\Utility\Url ? $url : new \Jkphl\Utility\Url($url); parent::__construct($input, strval($url)); }