File extension
File extension modules handle one or several different file
types. A file extension module is called after a location, or other
module type, has returned a Stdio.File object with the correct
extension.
The module type constant is MODULE_FILE_EXTENSION.
The available API methods are:
- array (string) query_file_extensions()
-
returns an array of strings containing the extensions this module
handles. It should be configurable by the user, the easiest way would
be to use a configuration variable of TYPE_STRING_LIST.
- mixed handle_file_extensions( Stdio.File file, string extension,
object id )
-
is the method that will be called to do the actual
work. file is the file object that a previous module returned.
extension is the extension of the request, id the
request information object. For possible return values see the responses chapter.
|