/limonade/abstract.php

Description

Abstract methods that might be redefined by user Do not include this file in your app: it only aims to provide documentation about those functions.

Functions
after (line 82)

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
string after (string $output, array() $route)
  • string $output
  • array() $route: array (like returned by route_find(), with keys "method", "pattern", "names", "callback", "params", "options")
autoload_controller (line 50)

Called in run() just after the route matching, in order to load controllers.

If not specfied, the default function is called:

  1.  function autoload_controller($callback)
  2.  {
  3.    require_once_dir(option('controllers_dir'));
  4.  }

void autoload_controller (string $callback)
  • string $callback: the callback defined in matching route
autorender (line 175)

Called only if rendering $output is_null, like in a controller with no return statement.

  • abstract: this function might be defined by user
string autorender (array() $route)
  • array() $route: array (like returned by route_build(), with keys "method", "pattern", "names", "callback", "options")
before (line 65)

Called before each request.

This is very useful to define a default layout or passing common variables to the templates.

  • abstract: this function might be redefined by user
void before (array() $route)
  • array() $route: array (like returned by route_build(), with keys "method", "pattern", "names", "callback", "options")
before_exit (line 140)

Called before stoppping and exiting application.

  • abstract: this function might be redefined by user
void before_exit (boolean $exit)
  • boolean $exit: exit or not
before_render (line 159)

Rendering prefilter.

Useful if you want to transform your views before rendering. The first three parameters are the same as those provided to the `render` function.

  • return: with, in order, $content_or_func, $layout, $locals vars and the calculated $view_path
  • abstract: this function might be redefined by user
array before_render (string $content_or_func, string $layout, array $locals, array $view_path)
  • string $content_or_func: a function, a file in current views dir or a string
  • string $layout
  • array $locals
  • array $view_path: (by default
    1. file_path(option('views_dir'),$content_or_func);
    )
configure (line 18)

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
void configure ()
initialize (line 30)

Called in run() just after session start, and before checking request method and output buffer start.

  • abstract: this function might be redefined by user
void initialize ()
not_found (line 99)

Not found error output

  • return: "not found" output string
  • abstract: this function might be redefined by user
string not_found (string $errno, string $errstr, [string $errfile = null], [string $errline = null])
  • string $errno
  • string $errstr
  • string $errfile
  • string $errline
route_missing (line 128)

Called when a route is not found.

  • abstract: this function might be redefined by user
void route_missing (string $request_method, string $request_uri)
  • string $request_method
  • string $request_uri
server_error (line 114)

Server error output

  • return: "server error" output string
  • abstract: this function might be redefined by user
string server_error (string $errno, string $errstr, [string $errfile = null], [string $errline = null])
  • string $errno
  • string $errstr
  • string $errfile
  • string $errline

Documentation generated on Sat, 16 Oct 2010 19:09:43 +0200 by phpDocumentor 1.4.3