Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
Moodle\H5PDevelopment Class Reference

Public Member Functions

 __construct (H5PFrameworkInterface $H5PFramework, $filesPath, $language, $libraries=NULL)
 Constructor.
 
 getLanguage ($name, $majorVersion, $minorVersion, $language)
 Get translations for the given library.
 
 getLibraries ()
 
 getLibrary ($name, $majorVersion, $minorVersion)
 Get library.
 
 getSemantics ($name, $majorVersion, $minorVersion)
 Get semantics for the given library.
 

Static Public Member Functions

static libraryToString ($name, $majorVersion, $minorVersion)
 Writes library as string on the form "name majorVersion.minorVersion".
 

Public Attributes

const MODE_CONTENT = 1
 
const MODE_LIBRARY = 2
 
const MODE_NONE = 0
 

Constructor & Destructor Documentation

◆ __construct()

Moodle\H5PDevelopment::__construct ( H5PFrameworkInterface $H5PFramework,
$filesPath,
$language,
$libraries = NULL )

Constructor.

Parameters
H5PFrameworkInterface | object$H5PFrameworkThe frameworks implementation of the H5PFrameworkInterface
string$filesPathPath to where H5P should store its files
$language
array$librariesOptional cache input.

Member Function Documentation

◆ getLanguage()

Moodle\H5PDevelopment::getLanguage ( $name,
$majorVersion,
$minorVersion,
$language )

Get translations for the given library.

Parameters
string$nameof the library.
int$majorVersionof the library.
int$minorVersionof the library.
$language
Return values
stringTranslation

◆ getLibraries()

Moodle\H5PDevelopment::getLibraries ( )
Return values
arrayLibraries in development folder.

◆ getLibrary()

Moodle\H5PDevelopment::getLibrary ( $name,
$majorVersion,
$minorVersion )

Get library.

Parameters
string$nameof the library.
int$majorVersionof the library.
int$minorVersionof the library.
Return values
arraylibrary.

◆ getSemantics()

Moodle\H5PDevelopment::getSemantics ( $name,
$majorVersion,
$minorVersion )

Get semantics for the given library.

Parameters
string$nameof the library.
int$majorVersionof the library.
int$minorVersionof the library.
Return values
stringSemantics

◆ libraryToString()

static Moodle\H5PDevelopment::libraryToString ( $name,
$majorVersion,
$minorVersion )
static

Writes library as string on the form "name majorVersion.minorVersion".

Parameters
string$nameMachine readable library name
integer$majorVersion
$minorVersion
Return values
stringLibrary identifier.

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