Helper Class to return results to caller.
More...
|
string | $bypass_str |
| String to show if some bypass has happened.
|
|
string | $current_version |
| current version detected
|
|
integer | $error_code |
| See constants at the beginning of the file.
|
|
string | $feedback_str |
| String to show on error|on check|on ok.
|
|
string | $info |
| Aux. More...
|
|
string | $level |
| required/optional
|
|
string | $needed_version |
| version needed
|
|
string | $part |
| Which are we checking (database, php, php_extension, php_extension)
|
|
string null | $plugin = null |
| full plugin name or null if main environment
|
|
string | $restrict_str |
| String to show if some restrict has happened.
|
|
bool | $status |
| true means the test passed and all is OK. More...
|
|
Helper Class to return results to caller.
- Copyright
- 1999 onwards Martin Dougiamas http://moodle.com
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ __construct()
environment_results::__construct |
( |
|
$part | ) |
|
Constructor of the environment_result class.
Just set default values
- Parameters
-
◆ environment_results()
environment_results::environment_results |
( |
|
$part | ) |
|
Old syntax of class constructor.
Deprecated in PHP7.
- Deprecated:
- since Moodle 3.1
◆ getBypassStr()
environment_results::getBypassStr |
( |
| ) |
|
Get the bypass string.
- Return values
-
mixed | bypass string (can be an array of params for get_string or a single string to fetch from admin.php lang file). |
◆ getCurrentVersion()
environment_results::getCurrentVersion |
( |
| ) |
|
Get the current version.
- Return values
-
◆ getErrorCode()
environment_results::getErrorCode |
( |
| ) |
|
Get the error code.
- Return values
-
◆ getFeedbackStr()
environment_results::getFeedbackStr |
( |
| ) |
|
Get the feedback string.
- Return values
-
mixed | feedback string (can be an array of params for get_string or a single string to fetch from admin.php lang file). |
◆ getInfo()
environment_results::getInfo |
( |
| ) |
|
Get the aux info.
- Return values
-
◆ getLevel()
environment_results::getLevel |
( |
| ) |
|
Get the level.
- Return values
-
◆ getNeededVersion()
environment_results::getNeededVersion |
( |
| ) |
|
Get the needed version.
- Return values
-
◆ getPart()
environment_results::getPart |
( |
| ) |
|
Get the part this result belongs to.
- Return values
-
◆ getPluginName()
environment_results::getPluginName |
( |
| ) |
|
Get plugin name.
- Return values
-
◆ getRestrictStr()
environment_results::getRestrictStr |
( |
| ) |
|
Get the restrict string.
- Return values
-
mixed | restrict string (can be an array of params for get_string or a single string to fetch from admin.php lang file). |
◆ getStatus()
environment_results::getStatus |
( |
| ) |
|
Get the status.
- Return values
-
bool | true means the test passed and all is OK. false means it failed. |
◆ setBypassStr()
environment_results::setBypassStr |
( |
|
$str | ) |
|
Set the bypass string.
- Parameters
-
string | $str | the bypass string that will be fetched from the admin lang file. pass just the string or pass an array of params for get_string You always should put your string in admin.php but a third param is useful to pass an $a object / string to get_string |
◆ setCurrentVersion()
environment_results::setCurrentVersion |
( |
|
$current_version | ) |
|
Set the current version.
- Parameters
-
string | $current_version | the current version |
◆ setErrorCode()
environment_results::setErrorCode |
( |
|
$error_code | ) |
|
Set the error_code.
- Parameters
-
integer | $error_code | the error code (see constants above) |
◆ setFeedbackStr()
environment_results::setFeedbackStr |
( |
|
$str | ) |
|
Set the feedback string.
- Parameters
-
mixed | $str | the feedback string that will be fetched from the admin lang file. pass just the string or pass an array of params for get_string You always should put your string in admin.php but a third param is useful to pass an $a object / string to get_string |
◆ setInfo()
environment_results::setInfo |
( |
|
$info | ) |
|
Set the auxiliary info.
- Parameters
-
string | $info | the auxiliary info |
◆ setLevel()
environment_results::setLevel |
( |
|
$level | ) |
|
Set the level.
- Parameters
-
string | $level | the level (required, optional) |
◆ setNeededVersion()
environment_results::setNeededVersion |
( |
|
$needed_version | ) |
|
Set the needed version.
- Parameters
-
string | $needed_version | the needed version |
◆ setRestrictStr()
environment_results::setRestrictStr |
( |
|
$str | ) |
|
Set the restrict string.
- Parameters
-
string | $str | the restrict string that will be fetched from the admin lang file. pass just the string or pass an array of params for get_string You always should put your string in admin.php but a third param is useful to pass an $a object / string to get_string |
◆ setStatus()
environment_results::setStatus |
( |
|
$testpassed | ) |
|
Set the status.
- Parameters
-
bool | $testpassed | true means the test passed and all is OK. false means it failed. |
◆ strToReport()
environment_results::strToReport |
( |
|
$string, |
|
|
|
$class |
|
) |
| |
- Todo:
- Document this function
- Parameters
-
mixed | $string | params for get_string, either a string to fetch from admin.php or an array of params for get_string. |
string | $class | css class(es) for message. |
- Return values
-
string | feedback string fetched from lang file wrapped in p tag with class $class or returns empty string if $string is empty. |
◆ $info
string environment_results::$info |
Aux.
info (DB vendor, library...)
◆ $status
bool environment_results::$status |
true means the test passed and all is OK.
false means it failed.
The documentation for this class was generated from the following file: