projects
/
tweeper.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make get_contents() a static method
[tweeper.git]
/
tweeper.php
diff --git
a/tweeper.php
b/tweeper.php
index
74e9e2f
..
6cdf8cf
100644
(file)
--- a/
tweeper.php
+++ b/
tweeper.php
@@
-105,7
+105,7
@@
class Tweeper {
$this->xsltProcessor->importStylesheet($xslDoc);
}
$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(
# https://www.wjsams.com/c/docs/Wiki/Php-HowToSetUserAgentOnFileGetContents
$opts = array(
'http' => array(
@@
-123,7
+123,7
@@
class Tweeper {
}
public function tweep($uri) {
}
public function tweep($uri) {
- $html =
$this->
get_contents($uri);
+ $html =
Tweeper::
get_contents($uri);
$xmlDoc = new DOMDocument();
$xmlDoc->loadHTML($html);
$xmlDoc = new DOMDocument();
$xmlDoc->loadHTML($html);