Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
|
Security helper for the curl class. More...
Public Member Functions | |
get_blocked_url_string () | |
Returns a string, explaining that a URL is blocked. | |
url_is_blocked ($url) | |
Check whether the input url should be blocked or not. | |
Security helper for the curl class.
This class is intended as a base class for all curl security helpers. A curl security helper should provide a means to check a URL to determine whether curl should be allowed to request its content. It must also be able to return a simple string to explain that the URL is blocked, e.g. 'This URL is blocked'.
Curl security helpers are currently used by the 'curl' wrapper class in lib/filelib.php.
This class depends on:
|
abstract |
Returns a string, explaining that a URL is blocked.
string | the lang string indicating that the url has been blocked. |
Reimplemented in core\files\curl_security_helper.
|
abstract |
Check whether the input url should be blocked or not.
string | $url | the url to check. |
bool | true if the url is deemed to be blocked, false otherwise. |