Tiny text editor integration - Language Producer.
Copyright: | 2021 Andrew Lyons <andrew@nicols.co.uk> |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 357 lines (13 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
lang:: (14 methods):
__construct()
parse_file_information_from_url()
serve_file()
load_full_moodle()
is_full_moodle_loaded()
load_language_pack()
send_cached_pack()
store_lang_file()
is_candidate_file_available()
get_etag()
send_cached()
send_uncached()
send_unmodified_headers()
send_not_found()
__construct() X-Ref |
Constructor to load and serve the langfile. |
parse_file_information_from_url() X-Ref |
Parse the file information from the URL. |
serve_file() X-Ref |
Serve the language pack content. |
load_full_moodle() X-Ref |
Load the full Moodle Framework. |
is_full_moodle_loaded() X-Ref |
Check whether Moodle is fully loaded. return: bool |
load_language_pack() X-Ref |
Load the language pack strings. return: string[] |
send_cached_pack() X-Ref |
No description |
store_lang_file(array $strings) X-Ref |
Store a langauge cache file containing all of the processed strings. param: string[] $strings The strings to store |
is_candidate_file_available() X-Ref |
Check whether the candidate file exists. return: bool |
get_etag() X-Ref |
Get the eTag for the candidate file. This is a unique hash based on the file arguments. It does not need to consider the file content because we use a cache busting URL. return: string The eTag content |
send_cached() X-Ref |
Send the candidate file, with aggressive cachign headers. This includdes eTags, a last-modified, and expiry approximately 90 days in the future. |
send_uncached(array $strings) X-Ref |
Sends the content directly without caching it. param: string[] $strings |
send_unmodified_headers($lastmodified) X-Ref |
Send file not modified headers. param: int $lastmodified |
send_not_found(?string $message = null) X-Ref |
Sends a 404 message to indicate that the content was not found. param: null|string $message An optional informative message to include to help debugging |