The new names should be more explicative.
/**
* Get the contents from a URL.
*/
/**
* Get the contents from a URL.
*/
- private static function getContents($url) {
+ private static function getUrlContents($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,
/**
* Get the headers from a URL.
*/
/**
* Get the headers from a URL.
*/
- private static function getInfo($url) {
+ private static function getUrlInfo($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,
// 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::getUrlInfo($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) {
- $stylesheet_contents = $this->getContents($stylesheet);
+ $stylesheet_contents = $this->getUrlContents($stylesheet);
$xslDoc = new DOMDocument();
$xslDoc->loadXML($stylesheet_contents);
$xslDoc = new DOMDocument();
$xslDoc->loadXML($stylesheet_contents);
- $html = $this->getContents($src_url);
+ $html = $this->getUrlContents($src_url);
if (FALSE === $html) {
return NULL;
}
if (FALSE === $html) {
return NULL;
}