Moodle PHP Documentation 4.4
Moodle 4.4.1 (Build: 20240610) (db07c09afc5)
|
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. |