renamed webreader loadUrl method to getUrl to represent action by name
-> deprecated old name
This commit is contained in:
parent
6d05920ffa
commit
baaea70d12
@ -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
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user