/** * Creates a new dom object and calls loadFromUrl() on the * new object. * * @param string $url * @param CurlInterface $curl * @chainable */ public static function loadFromUrl($url, CurlInterface $curl = null) { $dom = new Dom(); self::$dom = $dom; if (is_null($curl)) { // use the default curl interface $curl = new Curl(); } return $dom->loadFromUrl($url, $curl); }
/** * Sets the $dom variable to null. */ public static function unload() { self::$dom = null; }