Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.2.x will end 22 April 2024 (12 months).
  • Bug fixes for security issues in 4.2.x will end 7 October 2024 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.1.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