| [ Index ] |
PHP Cross Reference of GlotPress |
[Source view] [Print] [Project Stats]
(no description)
| File Size: | 214 lines (6 kb) |
| Included or required: | 0 times |
| Referenced: | 0 times |
| Includes or requires: | 0 files |
GP_Route:: (19 methods):
__construct()
die_with_error()
before_request()
after_request()
validate()
invalid_and_redirect()
can()
cannot_and_redirect()
can_or_forbidden()
logged_in_or_forbidden()
redirect_with_error()
redirect()
headers_for_download()
set_notices_and_errors()
tmpl()
tmpl_404()
exit_()
header()
status_header()
| __construct() X-Ref |
| No description |
| die_with_error( $message, $status = 500 ) X-Ref |
| No description |
| before_request() X-Ref |
| No description |
| after_request() X-Ref |
| No description |
| validate( $thing ) X-Ref |
| Validates a thing and add its errors to the route's errors. param: object $thing a GP_Thing instance to validate return: bool whether the thing is valid |
| invalid_and_redirect( $thing, $url = null ) X-Ref |
| Same as validate(), but redirects to $url if the thing isn't valid. Note: this method calls $this->exit_() after the redirect and the code after it won't be executed. param: object $thing a GP_Thing instance to validate param: string $url where to redirect if the thing doesn't validate return: bool whether the thing is valid |
| can( $action, $object_type = null, $object_id = null ) X-Ref |
| No description |
| cannot_and_redirect( $action, $object_type = null, $object_id = null, $url = null ) X-Ref |
| If the current user isn't allowed to do an action, redirect and exit the current request param: string $action param: `string $object_type param: string $object_id param: string $url The URL to redirect. Default value: referrer or index page, if referrer is missing |
| can_or_forbidden( $action, $object_type = null, $object_id = null, $message = 'You are not allowed to do that!' ) X-Ref |
| No description |
| logged_in_or_forbidden() X-Ref |
| No description |
| redirect_with_error( $message, $url = null ) X-Ref |
| No description |
| redirect( $url = null ) X-Ref |
| No description |
| headers_for_download( $filename ) X-Ref |
| No description |
| set_notices_and_errors() X-Ref |
| No description |
| tmpl( $template, $args = array() X-Ref |
| Loads a template. param: string $template template name to load param: array $args Associative array with arguements, which will be exported in the template PHP file param: bool|string $honor_api If this is true or 'api' and the route is processing an API request |
| tmpl_404( $args ) X-Ref |
| No description |
| exit_( $message = 0 ) X-Ref |
| No description |
| header( $string ) X-Ref |
| No description |
| status_header( $status ) X-Ref |
| No description |
| Generated: Thu May 24 03:59:35 2012 | Hosted by follow the white rabbit. |