Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.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