Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.
/lib/ -> wasmlib.php (source)

This file contains various Web Assembly related functions, all functions here are self-contained and can be used in ABORT_AFTER_CONFIG scripts.

Copyright: 2021 Huong Nguyen <huongnv13@gmail.com>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 129 lines (4 kb)
Included or required:0 times
Referenced: 1 time
Includes or requires: 1 file
 lib/xsendfilelib.php

Defines 4 functions


Functions that are not part of a class:

wasm_send_cached(string $wasmpath, string $etag, string $filename = 'wasm.php')   X-Ref
Send Web Assembly file content with as much caching as possible

param: string $wasmpath Path to Web Assembly file
param: string $etag Etag
param: string $filename File name to be served

wasm_send_uncached(string $wasm, string $filename = 'wasm.php')   X-Ref
Send Web Assembly file without any caching

param: string $wasm Web Assembly file content
param: string $filename File name to be served

wasm_send_unmodified(int $lastmodified, string $etag)   X-Ref
Send Web Assembly file not modified headers

param: int $lastmodified Last modified timestamp
param: string $etag Etag

wasm_write_cache_file_content(string $file, string $content)   X-Ref
Create cache file for Web Assembly content

param: string $file full file path to cache file
param: string $content Web Assembly content