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 402] [Versions 310 and 403] [Versions 39 and 310]

(no description)

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

Defines 1 class

H5PDevelopment:: (8 methods):
  __construct()
  getFileContents()
  findLibraries()
  getLibraries()
  getLibrary()
  getSemantics()
  getLanguage()
  libraryToString()


Class: H5PDevelopment  - X-Ref

This is a data layer which uses the file system so it isn't specific to any framework.

__construct(H5PFrameworkInterface $H5PFramework, $filesPath, $language, $libraries = NULL)   X-Ref
Constructor.

param: H5PFrameworkInterface|object $H5PFramework
param: string $filesPath
param: $language
param: array $libraries Optional cache input.

getFileContents($file)   X-Ref
Get contents of file.

param: string $file File path.
return: mixed String on success or NULL on failure.

findLibraries($path)   X-Ref
Scans development directory and find all libraries.

param: string $path Libraries development folder

getLibraries()   X-Ref

return: array Libraries in development folder.

getLibrary($name, $majorVersion, $minorVersion)   X-Ref
Get library

param: string $name of the library.
param: int $majorVersion of the library.
param: int $minorVersion of the library.
return: array library.

getSemantics($name, $majorVersion, $minorVersion)   X-Ref
Get semantics for the given library.

param: string $name of the library.
param: int $majorVersion of the library.
param: int $minorVersion of the library.
return: string Semantics

getLanguage($name, $majorVersion, $minorVersion, $language)   X-Ref
Get translations for the given library.

param: string $name of the library.
param: int $majorVersion of the library.
param: int $minorVersion of the library.
param: $language
return: string Translation

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

param: string $name Machine readable library name
param: integer $majorVersion
param: $minorVersion
return: string Library identifier.