Source for file abstract.php
Documentation is available at abstract.php
* Abstract methods that might be redefined by user
* Do not include this file in your app: it only aims to provide documentation
* It will be called when app is launched (at the begining of the run function).
* You can define options inside it, a connection to a database ...
* @abstract this function might be redefined by user
* Called in run() just after session start, and before checking request method
* and output buffer start.
* @abstract this function might be redefined by user
* Called in run() just after the route matching, in order to load controllers.
* If not specfied, the default function is called:
* function autoload_controller($callback)
* require_once_dir(option('controllers_dir'));
* @param string $callback the callback defined in matching route
* Called before each request.
* This is very useful to define a default layout or passing common variables
* @abstract this function might be redefined by user
* @param array() $route array (like returned by {@link route_build()},
* with keys "method", "pattern", "names", "callback", "options")
* An `after` output filter
* Called after each request and can apply a transformation to the output
* (except for `render_file` outputs which are sent directly to the output buffer).
* @abstract this function might be redefined by user
* @param array() $route array (like returned by {@link route_find()},
* with keys "method", "pattern", "names", "callback", "params", "options")
function after($output, $route)
* @abstract this function might be redefined by user
* @return string "not found" output string
function not_found($errno, $errstr, $errfile=
null, $errline=
null)
* @abstract this function might be redefined by user
* @return string "server error" output string
function server_error($errno, $errstr, $errfile=
null, $errline=
null)
* Called when a route is not found.
* @abstract this function might be redefined by user
* @param string $request_method
* @param string $request_uri
* Called before stoppping and exiting application.
* @abstract this function might be redefined by user
* @param boolean exit or not
* Useful if you want to transform your views before rendering.
* The first three parameters are the same as those provided
* to the `render` function.
* @abstract this function might be redefined by user
* @param string $content_or_func a function, a file in current views dir or a string
* @param array $view_path (by default <code>file_path(option('views_dir'),$content_or_func);</code>)
* @return array with, in order, $content_or_func, $layout, $locals vars
* and the calculated $view_path
function before_render($content_or_func, $layout, $locals, $view_path)
# transform $content_or_func, $layout, $locals or $view_path…
return array($content_or_func, $layout, $locals, $view_path);
* Called only if rendering $output is_null,
* like in a controller with no return statement.
* @abstract this function might be defined by user
* @param array() $route array (like returned by {@link route_build()},
* with keys "method", "pattern", "names", "callback", "options")
# process output depending on $route
Documentation generated on Sat, 16 Oct 2010 19:09:43 +0200 by phpDocumentor 1.4.3