Moodle PHP Documentation 4.3
Moodle 4.3.5 (Build: 20240610) (7dcfaa79f78)
core_h5p\local\library\handler Class Reference

Base class for library handlers. More...

Inheritance diagram for core_h5p\local\library\handler:
h5plib_v126\local\library\handler

Static Public Member Functions

static autoload ($classname)
 SPL Autoloading function for H5P.
 
static get_h5p_core_library_base (?string $filepath=null)
 Get the base path for the current H5P Core Library.
 
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_library_base ()
 Get the base path for the H5P Libraries.
 
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 register ()
 Register the H5P autoloader.
 

Static Protected Member Functions

static get_class_list ()
 Return the list of classes with their location within the joubel directory.
 

Detailed Description

Base class for library handlers.

If a new H5P libraries handler plugin has to be created, it has to define class PLUGINNAME\local\library\handler that extends core_h5p\local\library\handler.

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

Member Function Documentation

◆ autoload()

static core_h5p\local\library\handler::autoload ( $classname)
static

SPL Autoloading function for H5P.

Parameters
string$classnameThe name of the class to load

◆ get_class_list()

static core_h5p\local\library\handler::get_class_list ( )
staticprotected

Return the list of classes with their location within the joubel directory.

Return values
array

◆ get_h5p_core_library_base()

static core_h5p\local\library\handler::get_h5p_core_library_base ( ?string $filepath = null)
static

Get the base path for the current H5P Core Library.

Parameters
string$filepathThe path within the H5P root
Return values
null|string

◆ get_h5p_core_library_url()

static core_h5p\local\library\handler::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\handler::get_h5p_editor_library_base ( ?string $filepath = null)
static

Get the base path for the current H5P Editor Library.

Parameters
null | 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\handler::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 to a file in the H5P Editor library.

◆ get_h5p_library_base()

static core_h5p\local\library\handler::get_h5p_library_base ( )
static

Get the base path for the H5P Libraries.

Return values
null|string

◆ get_h5p_string()

static core_h5p\local\library\handler::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\handler::get_h5p_version ( )
staticabstract

Get the current version of the H5P core library.

Return values
string

Reimplemented in h5plib_v126\local\library\handler.


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