From 2e84774ad219234c1e770507d24f24d1a96e1f42 Mon Sep 17 00:00:00 2001 From: Antonio Ospite Date: Sun, 11 Aug 2013 21:11:03 +0200 Subject: [PATCH 1/1] Make get_contents() a static method --- tweeper.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); -- 2.1.4