See Release Notes
Long Term Support Release
Tiny text editor integration - TinyMCE Loader.
Copyright: | 2022 Andrew Lyons <andrew@nicols.co.uk> |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 338 lines (12 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
loader:: (14 methods):
__construct()
parse_file_information_from_url()
serve_file()
get_filepath_from_dirroot()
load_content_from_dirroot()
send_uncached_from_dirroot()
is_candidate_file_available()
send_cached_file_if_available()
store_filepath_file()
get_etag()
send_cached()
send_uncached_file()
send_unmodified_headers()
send_not_found()
__construct() X-Ref |
Initialise the class, parse the request and serve the content. |
parse_file_information_from_url() X-Ref |
Parse the file information from the URL. |
serve_file() X-Ref |
Serve the requested file from the most appropriate location, caching if possible. |
get_filepath_from_dirroot() X-Ref |
Get the full filepath to the requested file. return: string |
load_content_from_dirroot() X-Ref |
Load the file content from the dirroot. return: string |
send_uncached_from_dirroot() X-Ref |
Send the file content from the dirroot. If the file is not found, send the 404 response instead. |
is_candidate_file_available() X-Ref |
Check whether the candidate file exists. return: bool |
send_cached_file_if_available() X-Ref |
Send the candidate file. |
store_filepath_file() X-Ref |
Store the file content in the candidate file. |
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_file(string $filepath) X-Ref |
Sends the content directly without caching it. No aggressive caching is used, and the expiry is set to the current time. param: string $filepath |
send_unmodified_headers(int $lastmodified) X-Ref |
Send headers to indicate that the file has not been modified at all param: int $lastmodified |
send_not_found() X-Ref |
Sends a 404 message to indicate that the content was not found. |