renamed webreader loadUrl method to getUrl to represent action by name

-> deprecated old name
This commit is contained in:
Steffen Schröder 2014-08-25 15:25:09 +02:00
parent 6d05920ffa
commit baaea70d12

View File

@ -22,7 +22,7 @@ abstract class WebReader {
* @param callable $function
* @return Response
*/
public static function loadUrl($url, callable $function = null) {
public static function getUrl($url, callable $function = null) {
$request = static::newRequest($url);
$response = $request->send();
if ($function) {
@ -31,6 +31,17 @@ abstract class WebReader {
return $response;
}
/**
* @deprecated
* @see WebReader::getUrl()
*/
public static function loadUrl($url, callable $function = null) {
if ($function) {
return static::getUrl($url, $function);
}
return static::getUrl($url);
}
/**
* Create a new cURL Request for the given URL
*