Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

Differences Between: [Versions 310 and 311] [Versions 310 and 400] [Versions 310 and 401] [Versions 310 and 402] [Versions 310 and 403] [Versions 39 and 310]

Minimalistic library, usable even when no other moodle libs are loaded. The only library that gets loaded if you define ABORT_AFTER_CONFIG before including main config.php. You can resume normal script operation if you define ABORT_AFTER_CONFIG_CANCEL and require the setup.php

Copyright: 2009 Petr Skoda (skodak)
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 207 lines (7 kb)
Included or required: 1 time
Referenced: 0 times
Includes or requires: 0 files

Defines 5 functions


Functions that are not part of a class:

min_optional_param($name, $default, $type)   X-Ref
Minimalistic parameter validation function.
Can not use optional param because moodlelib.php is not loaded yet

param: string $name
param: mixed $default
param: string $type
return: mixed

min_clean_param($value, $type)   X-Ref
Minimalistic parameter cleaning function.

Note: Can not use optional param because moodlelib.php is not loaded yet.

param: string $value
param: string $type
return: mixed

min_fix_utf8($value)   X-Ref
Minimalistic UTF-8 sanitisation.

Note: This duplicates fix_utf8() intentionally for now.

param: string $value
return: string

min_enable_zlib_compression()   X-Ref
This method tries to enable output compression if possible.
This function must be called before any output or headers.

(IE6 is not supported at all.)

return: boolean, true if compression enabled

min_get_slash_argument($clean = true)   X-Ref
Returns the slashargument part of the URL.

Note: ".php" is NOT allowed in slasharguments,
it is intended for ASCII characters only.

param: boolean $clean - Should we do cleaning on this path argument. If you set this
return: string