beforeHandleRequest Application Delegate Class Method[Permalink]Return to Application Delegate Class SynopsisThe beforeHandleRequest method is a very useful hook that can be implemented in an Application Delegate Class to perform some processing before every request. This hook is called after user authentication is taken care of, but before control has been passed to the specific action. This means that it is possible to do things such as change the current action or adjust query parameters depending on various factors. Example Uses
ExamplesExample 1: Changing the default action for a particular table
In the above example, we make use of the Application configuration variable using_default_action? to find out if the request is using the default action. This flag is set by Xataface if the user hasn't explicitly declared the action in the URL (i.e. -action has not explicitly been set). See Also
|