Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
core_h5p\local\library\autoloader Class Reference

H5P autoloader management class. More...

Static Public Member Functions

static get_all_handlers ()
 Returns the list of plugins that can work as H5P library handlers (have class PLUGINNAME\local\library\handler)
 
static get_default_handler ()
 Returns the default H5P library handler class.
 
static get_default_handler_library ()
 Returns the default H5P library handler.
 
static get_h5p_core_library_url (?string $filepath=null, ?array $params=null)
 Get a URL for the current H5P Core Library.
 
static get_h5p_editor_library_base (?string $filepath=null)
 Get the base path for the current H5P Editor Library.
 
static get_h5p_editor_library_url (?string $filepath=null, ?array $params=null)
 Get a URL for the current H5P Editor Library.
 
static get_h5p_string (string $identifier, string $language)
 Returns a localized string, if it exists in the h5plib plugin and the value it's different from the English version.
 
static get_h5p_version ()
 Get the current version of the H5P core library.
 
static get_handler_classname ()
 Returns the current H5P library handler class.
 
static register ()
 Register the H5P autoloader.
 

Detailed Description

H5P autoloader management class.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Member Function Documentation

◆ get_all_handlers()

static core_h5p\local\library\autoloader::get_all_handlers ( )
static

Returns the list of plugins that can work as H5P library handlers (have class PLUGINNAME\local\library\handler)

Return values
arraywith the format: pluginname => class

◆ get_default_handler()

static core_h5p\local\library\autoloader::get_default_handler ( )
static

Returns the default H5P library handler class.

Return values
string|nullH5P library handler class

◆ get_default_handler_library()

static core_h5p\local\library\autoloader::get_default_handler_library ( )
static

Returns the default H5P library handler.

Return values
string|nullH5P library handler

◆ get_h5p_core_library_url()

static core_h5p\local\library\autoloader::get_h5p_core_library_url ( ?string $filepath = null,
?array $params = null )
static

Get a URL for the current H5P Core Library.

Parameters
string$filepathThe path within the h5p root
array$paramsthese params override current params or add new
Return values
null|moodle_url

◆ get_h5p_editor_library_base()

static core_h5p\local\library\autoloader::get_h5p_editor_library_base ( ?string $filepath = null)
static

Get the base path for the current H5P Editor Library.

Parameters
string$filepathThe path within the h5p root.
Return values
stringPath to a file in the H5P Editor library.

◆ get_h5p_editor_library_url()

static core_h5p\local\library\autoloader::get_h5p_editor_library_url ( ?string $filepath = null,
?array $params = null )
static

Get a URL for the current H5P Editor Library.

Parameters
string$filepathThe path within the h5p root.
array$paramsThese params override current params or add new.
Return values
null|moodle_urlThe moodle_url instance to a file in the H5P Editor library.

◆ get_h5p_string()

static core_h5p\local\library\autoloader::get_h5p_string ( string $identifier,
string $language )
static

Returns a localized string, if it exists in the h5plib plugin and the value it's different from the English version.

Parameters
string$identifierThe key identifier for the localized string
string$languageLanguage to get the localized string.
Return values
string|nullThe localized string or null if it doesn't exist in this H5P library plugin.

◆ get_h5p_version()

static core_h5p\local\library\autoloader::get_h5p_version ( )
static

Get the current version of the H5P core library.

Return values
string

◆ get_handler_classname()

static core_h5p\local\library\autoloader::get_handler_classname ( )
static

Returns the current H5P library handler class.

Return values
stringH5P library handler class
Exceptions
moodle_exception

The documentation for this class was generated from the following file: