If the given url path didn't match a function, it is passed to this function for further handling. By default, it throws a NoSuchFunctionException. Overriding it might be useful if you want to serve generic filenames or an opDispatch kind of thing. (opDispatch itself won't work because it's name argument needs to be known at compile time!)
If the user goes to your program without specifying a path, this function is called.
Gets the CSRF info (an associative array with key and token inside at least) from the session. Note that the actual token is generated by the Session class.
forwards to _getGenericContainer
When the html document envelope is used, this function is used to get a html element where the return value is appended. It's the main function to override to provide custom HTML templates.
Override this if you have initialization work that must be done *after* cgi and reflection is ready. It should be used instead of the constructor for most work.
This one is called at least once per call. (_initialize is only called once per process)
we have to add these things to the document...
On each call, you can register another post processor for the generated html. If your delegate takes a Document, it will only run on document envelopes (full pages generated). If you take an Element, it will apply on almost any generated html.
Returns a list of links to all functions in this class or sub-classes You can expose it publicly with alias: "alias _sitemap sitemap;" for example.
Returns the stylesheet for this module. Use it to encapsulate the needed info for your output so the module is more easily reusable Override this to provide your own stylesheet. (of course, you can always provide it via _catchAll or any standard css file/style element too.)
Adds CSRF tokens to the document for use by script (required by the Javascript API) and then calls addCsrfTokens(document.root) to add them to all POST forms as well.
This adds CSRF tokens to all forms in the tree
override this to change cross-site request forgery checks.
Temporarily disables the redirect() call.
Re-enables redirects. Call this once for every call to disableRedirects.
Shorthand for ensurePost and checkCsrfToken. You should use this on non-indempotent functions. Override it if doing some custom checking.
This tentatively redirects the user - depends on the envelope fomat You can temporarily disable this using disableRedirects()
Returns the combined stylesheet of all child modules and this module
When in website mode, you can use this to beautify the error message
lower level access to the request
use this to look at exceptions and set up redirects and such. keep in mind it does NOT change the regular behavior
Override this if you want to do something special to the document You should probably call super._postProcess at some point since I might add some default transformations here. By default, it forwards the document root to _postProcess(Element).
Override this to do something special to returned HTML Elements. This is ONLY run if the return type is(: Element). It is NOT run if the return type is(: Document).
convenience function to enforce that the current method is POST. You should use this if you are going to commit to the database or something.
Everything should derive from this instead of the old struct namespace used before Your class must provide a default constructor.