Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

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

(no description)

File Size: 218 lines (6 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: Settings  - X-Ref

setLocale($locale)   X-Ref
Set the locale code to use for formula translations and any special formatting.

param: string $locale The locale code to use (e.g. "fr" or "pt_br" or "en_uk")
return: bool Success or failure

setChartRenderer($rendererClass)   X-Ref
Identify to PhpSpreadsheet the external library to use for rendering charts.

param: string $rendererClass Class name of the chart renderer

getChartRenderer()   X-Ref
Return the Chart Rendering Library that PhpSpreadsheet is currently configured to use.

return: null|string Class name of the chart renderer

setLibXmlLoaderOptions($options)   X-Ref
Set default options for libxml loader.

param: int $options Default options for libxml loader

getLibXmlLoaderOptions()   X-Ref
Get default options for libxml loader.
Defaults to LIBXML_DTDLOAD | LIBXML_DTDATTR when not set explicitly.

return: int Default options for libxml loader

setLibXmlDisableEntityLoader($state)   X-Ref
Enable/Disable the entity loader for libxml loader.
Allow/disallow libxml_disable_entity_loader() call when not thread safe.
Default behaviour is to do the check, but if you're running PHP versions
7.2 < 7.2.1
then you may need to disable this check to prevent unwanted behaviour in other threads
SECURITY WARNING: Changing this flag to false is not recommended.

param: bool $state

getLibXmlDisableEntityLoader()   X-Ref
Return the state of the entity loader (disabled/enabled) for libxml loader.

return: bool $state

setCache(CacheInterface $cache)   X-Ref
Sets the implementation of cache that should be used for cell collection.


getCache()   X-Ref
Gets the implementation of cache that should be used for cell collection.

return: CacheInterface

setHttpClient(ClientInterface $httpClient, RequestFactoryInterface $requestFactory)   X-Ref
Set the HTTP client implementation to be used for network request.


unsetHttpClient()   X-Ref
Unset the HTTP client configuration.


getHttpClient()   X-Ref
Get the HTTP client implementation to be used for network request.


getRequestFactory()   X-Ref
Get the HTTP request factory.


assertHttpClient()   X-Ref
No description