Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.0.x will end 8 May 2023 (12 months).
  • Bug fixes for security issues in 4.0.x will end 13 November 2023 (18 months).
  • PHP version: minimum PHP 7.3.0 Note: the minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is also supported.

Differences Between: [Versions 39 and 400] [Versions 400 and 402] [Versions 400 and 403]

(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.

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

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

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

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

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

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

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

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

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