From: Antonio Ospite Date: Sun, 11 Aug 2013 19:11:03 +0000 (+0200) Subject: Make get_contents() a static method X-Git-Tag: v0.1~12^2~5 X-Git-Url: https://git.ao2.it/tweeper.git/commitdiff_plain/2e84774ad219234c1e770507d24f24d1a96e1f42?ds=sidebyside;hp=-c Make get_contents() a static method --- 2e84774ad219234c1e770507d24f24d1a96e1f42 diff --git a/tweeper.php b/tweeper.php index 74e9e2f..6cdf8cf 100644 --- a/tweeper.php +++ b/tweeper.php @@ -105,7 +105,7 @@ class Tweeper { $this->xsltProcessor->importStylesheet($xslDoc); } - private function get_contents($uri) { + private static function get_contents($uri) { # https://www.wjsams.com/c/docs/Wiki/Php-HowToSetUserAgentOnFileGetContents $opts = array( 'http' => array( @@ -123,7 +123,7 @@ class Tweeper { } public function tweep($uri) { - $html = $this->get_contents($uri); + $html = Tweeper::get_contents($uri); $xmlDoc = new DOMDocument(); $xmlDoc->loadHTML($html);