|
| abort_all_db_transactions () |
| Unconditionally abort all database transactions, this function should be called from exception handlers only.
|
|
| check_dir_exists ($dir, $create=true, $recursive=true) |
| Function to check if a directory exists and by default create it if not exists.
|
|
| default_error_handler ($errno, $errstr, $errfile, $errline) |
| Default error handler, prevents some white screens.
|
|
| default_exception_handler ($ex) |
| Default exception handler.
|
|
| during_initial_install () |
| Indicates whether we are in the middle of the initial Moodle install.
|
|
| format_backtrace ($callers, $plaintext=false) |
| Formats a backtrace ready for output.
|
|
| generate_uuid () |
|
| get_backup_temp_directory ($directory) |
| Get the full path of a directory under $CFG->backuptempdir.
|
|
| get_docs_url ($path=null) |
| Returns the Moodle Docs URL in the users language for a given 'More help' link.
|
|
| get_exception_info ($ex) |
| Returns detailed information about specified exception.
|
|
| get_real_size ($size=0) |
| Converts numbers like 10M into bytes.
|
|
| get_request_storage_directory ($exceptiononerror=true, bool $forcecreate=false) |
| Get a per-request storage directory in the tempdir.
|
|
| hash_local_config_cache () |
| Calculate a proper hash to be able to invalidate stale cached configs.
|
|
| ini_get_bool ($ini_get_arg) |
| This function makes the return value of ini_get consistent if you are setting server directives through the .htaccess file in apache.
|
|
| init_performance_info () |
| Initializes our performance info early.
|
|
| initialise_fullme () |
| Initialises $FULLME and friends.
|
|
| initialise_fullme_cli () |
| Initialises $FULLME and friends for command line scripts.
|
|
| initialise_local_config_cache () |
| Cache any immutable config locally to avoid constant DB lookups.
|
|
| is_early_init ($backtrace) |
| This function encapsulates the tests for whether an exception was thrown in early init – either during setup.php or during init of $OUTPUT.
|
|
| is_major_upgrade_required () |
| Check whether a major upgrade is needed.
|
|
| make_backup_temp_directory ($directory, $exceptiononerror=true) |
| Create a directory under $CFG->backuptempdir and make sure it is writable.
|
|
| make_cache_directory ($directory, $exceptiononerror=true) |
| Create a directory under cachedir and make sure it is writable.
|
|
| make_localcache_directory ($directory, $exceptiononerror=true) |
| Create a directory under localcachedir and make sure it is writable.
|
|
| make_request_directory (bool $exceptiononerror=true, bool $forcecreate=false) |
| Create a per-request directory and make sure it is writable.
|
|
| make_temp_directory ($directory, $exceptiononerror=true) |
| Create a directory under tempdir and make sure it is writable.
|
|
| make_unique_writable_directory ($basedir, $exceptiononerror=true) |
| Create a new unique directory within the specified directory.
|
|
| make_upload_directory ($directory, $exceptiononerror=true) |
| Create a directory under dataroot and make sure it is writable.
|
|
| merge_query_params (array &$target, array $values) |
| Merge parsed POST chunks.
|
|
| proxy_log_callback ($code) |
| Add http stream instrumentation.
|
|
| raise_memory_limit ($newlimit) |
| Function to raise the memory limit to a new value.
|
|
| redirect_if_major_upgrade_required () |
| Redirect to the Notifications page if a major upgrade is required, and terminate the current user session.
|
|
| reduce_memory_limit ($newlimit) |
| Function to reduce the memory limit to a new value.
|
|
| require_phpunit_isolation () |
| A helper function for deprecated files to use to ensure that, when they are included for unit tests, they are run in an isolated process.
|
|
| set_access_log_user () |
| Webserver access user logging.
|
|
| setup_get_remote_url () |
| Get the URL that PHP/the web server thinks it is serving.
|
|
| setup_validate_php_configuration () |
| This function verifies the sanity of PHP configuration and stops execution if anything critical found.
|
|
| upgrade_ensure_not_running ($warningonly=false) |
| Makes sure that upgrade process is not running.
|
|
| workaround_max_input_vars () |
| Try to work around the 'max_input_vars' restriction if necessary.
|
|
|
const | DEBUG_ALL E_ALL & ~E_STRICT |
| All problems except strict PHP warnings.
|
|
const | DEBUG_DEVELOPER E_ALL | E_STRICT |
| DEBUG_ALL with all debug messages and strict warnings.
|
|
const | DEBUG_MINIMAL E_ERROR | E_PARSE |
| Fatal errors only.
|
|
const | DEBUG_NONE 0 |
| No warnings and errors at all.
|
|
const | DEBUG_NORMAL E_ERROR | E_PARSE | E_WARNING | E_NOTICE |
| Errors, warnings and notices.
|
|
const | MEMORY_EXTRA -3 |
| Large memory limit for given platform - used in cron, upgrade, and other places that need a lot of memory.
|
|
const | MEMORY_HUGE -4 |
| Extremely large memory limit - not recommended for standard scripts.
|
|
const | MEMORY_STANDARD -2 |
| Standard memory limit for given platform.
|
|
const | MEMORY_UNLIMITED -1 |
| Remove any memory limits.
|
|