projects
/
tweeper.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rename epoch_to_gmdate to epochToGmdate, and str_to_gmdate to strToGmdate
[tweeper.git]
/
tweeper.php
diff --git
a/tweeper.php
b/tweeper.php
index
7630e0a
..
fdf6e5c
100644
(file)
--- a/
tweeper.php
+++ b/
tweeper.php
@@
-44,7
+44,7
@@
class Tweeper {
/**
* Convert numeric Epoch to the date format expected in a RSS document.
*/
/**
* Convert numeric Epoch to the date format expected in a RSS document.
*/
- public static function epoch
_to_g
mdate($timestamp) {
+ public static function epoch
ToG
mdate($timestamp) {
if (!is_numeric($timestamp) || is_nan($timestamp)) {
$timestamp = 0;
}
if (!is_numeric($timestamp) || is_nan($timestamp)) {
$timestamp = 0;
}
@@
-55,19
+55,19
@@
class Tweeper {
/**
* Convert generic date string to the date format expected in a RSS document.
*/
/**
* Convert generic date string to the date format expected in a RSS document.
*/
- public static function str
_to_g
mdate($date) {
+ public static function str
ToG
mdate($date) {
$timestamp = strtotime($date);
if (FALSE === $timestamp) {
$timestamp = 0;
}
$timestamp = strtotime($date);
if (FALSE === $timestamp) {
$timestamp = 0;
}
- return Tweeper::epoch
_to_g
mdate($timestamp);
+ return Tweeper::epoch
ToG
mdate($timestamp);
}
/**
* Get the contents from a URL.
*/
}
/**
* Get the contents from a URL.
*/
- private static function getContents($url) {
+ private static function get
Url
Contents($url) {
$ch = curl_init($url);
curl_setopt_array($ch, array(
CURLOPT_HEADER => FALSE,
$ch = curl_init($url);
curl_setopt_array($ch, array(
CURLOPT_HEADER => FALSE,
@@
-88,7
+88,7
@@
class Tweeper {
/**
* Get the headers from a URL.
*/
/**
* Get the headers from a URL.
*/
- private static function getInfo($url) {
+ private static function get
Url
Info($url) {
$ch = curl_init($url);
curl_setopt_array($ch, array(
CURLOPT_HEADER => TRUE,
$ch = curl_init($url);
curl_setopt_array($ch, array(
CURLOPT_HEADER => TRUE,
@@
-133,7
+133,7
@@
class Tweeper {
// See http://sourceforge.net/p/feedvalidator/bugs/72/
$http_url = preg_replace("/^https/", "http", $url);
// See http://sourceforge.net/p/feedvalidator/bugs/72/
$http_url = preg_replace("/^https/", "http", $url);
- $url_info = Tweeper::getInfo($http_url);
+ $url_info = Tweeper::get
Url
Info($http_url);
$supported = in_array($url_info['content_type'], $supported_content_types);
if (!$supported) {
$supported = in_array($url_info['content_type'], $supported_content_types);
if (!$supported) {
@@
-196,7
+196,7
@@
class Tweeper {
return NULL;
}
return NULL;
}
- $stylesheet_contents = $this->getContents($stylesheet);
+ $stylesheet_contents = $this->get
Url
Contents($stylesheet);
$xslDoc = new DOMDocument();
$xslDoc->loadXML($stylesheet_contents);
$xslDoc = new DOMDocument();
$xslDoc->loadXML($stylesheet_contents);
@@
-310,7
+310,7
@@
class Tweeper {
return NULL;
}
return NULL;
}
- $html = $this->getContents($src_url);
+ $html = $this->get
Url
Contents($src_url);
if (FALSE === $html) {
return NULL;
}
if (FALSE === $html) {
return NULL;
}