
Public Member Functions | |
| __construct () | |
| _constructClasses () | |
| _constructComponents (&$object) | |
| render ($action, $layout=false) | |
| & | renderView ($action, $layout=null) |
| & | renderCachedHtml ($html, $layout=null) |
| redirect ($url, $status=null, $die=true) | |
| setPageTitle ($n) | |
| set ($name, $value=null) | |
| setRef ($name, &$value) | |
| get ($name) | |
| log ($what, $where) | |
| beforeRender () | |
| beforeAction () | |
| beforeFilter () | |
| afterFilter () | |
Data Fields | |
| $uses = array() | |
| $helpers = array('html') | |
| $components = array() | |
| $cache = null | |
| $layout = 'default' | |
| $autoRender = true | |
| $params = null | |
| $output = '' | |
| $viewVars = array() | |
| $action | |
| $webroot | |
| $basePath | |
| $base | |
| $pageTitle = '' | |
| $view = 'View' | |
Protected Member Functions | |
| initViewClass () | |
Protected Attributes | |
| $viewClass = null | |
Definition at line 21 of file controller.php.
| __construct | ( | ) |
constructor. builds an array of all models, components and helpers this controller (including the ones of the appController) needs.
Definition at line 120 of file controller.php.
References $uses.
| _constructClasses | ( | ) |
loads all models this controller needs
Definition at line 169 of file controller.php.
References _constructComponents(), classRegistry::getObject(), kataUse(), and loadModel().

| _constructComponents | ( | &$ | object | ) |
loads all components this controller needs
| object | $object the class-handle of the current controller |
Definition at line 186 of file controller.php.
References classRegistry::getObject().
Referenced by _constructClasses().


| afterFilter | ( | ) |
Called just after the view was rendered. Is never called if autoRender is false. Can be used to manipulate the views contents in the controllers output-property
Reimplemented in ScaffoldController.
Definition at line 376 of file controller.php.
Referenced by renderView().

| beforeAction | ( | ) |
call this after the controller has been initialized (read: models, components etc contructed) and we are about to call the myaction() method of the controller
Reimplemented in ScaffoldController.
Definition at line 363 of file controller.php.
References beforeRender().

| beforeFilter | ( | ) |
Called just before the view is rendered. Is never called if autoRender is false
Reimplemented in ScaffoldController.
Definition at line 370 of file controller.php.
Referenced by renderView().

| beforeRender | ( | ) |
deprecated. use beforeAction() everywhere
Definition at line 357 of file controller.php.
Referenced by beforeAction().

| get | ( | $ | name | ) |
Get a variable that's available inside the view. The given name-string is the name of the global variable inside the view.
| string | $name name of the variable |
Definition at line 334 of file controller.php.
| initViewClass | ( | ) | [protected] |
include and instanciate view-class
Definition at line 213 of file controller.php.
References kataUse().
Referenced by renderCachedHtml(), and renderView().


| log | ( | $ | what, | |
| $ | where | |||
| ) |
shortcut to writeLog
| string | $what what text to log | |
| int | $where where to log (KATA_DEBUG OR KATA_ERROR) |
Definition at line 349 of file controller.php.
References writeLog().

| redirect | ( | $ | url, | |
| $ | status = null, |
|||
| $ | die = true | |||
| ) |
redirect to the given url. if relative the base-url to the framework is added.
| string | $url to redirect to | |
| int | $status http status-code to use for redirection (default 303=get the new url via GET even if this page was reached via POST) | |
| bool | $die if we should die() after redirect (default: true); |
Definition at line 264 of file controller.php.
Referenced by ScaffoldController::delete(), ScaffoldController::insert(), and ScaffoldController::update().

| render | ( | $ | action, | |
| $ | layout = false | |||
| ) |
render the given view with the given layout and put the result in the output-property of this controller. this just calls renderView which does the real work.
| string | $action name of the view (without .php) to render | |
| string | $layout optional: name of the layout(-view) to render the view into. if false the default layout of this controller is taken |
Definition at line 206 of file controller.php.
References $action, $layout, and renderView().
Referenced by ScaffoldController::index(), ScaffoldController::insert(), and ScaffoldController::update().


| & renderCachedHtml | ( | $ | html, | |
| $ | layout = null | |||
| ) |
render the given view with the given layout and put the result in the output-property of this controller.
| string | $html raw html | |
| string | $layout optional: name of the layout(-view) to render the view into. if false the default layout of this controller is taken |
Definition at line 245 of file controller.php.
References $layout, and initViewClass().

| & renderView | ( | $ | action, | |
| $ | layout = null | |||
| ) |
render the given view with the given layout and put the result in the output-property of this controller.
| string | $action name of the view (without .php) to render | |
| string | $layout optional: name of the layout(-view) to render the view into. if false the default layout of this controller is taken |
Definition at line 226 of file controller.php.
References $action, $layout, afterFilter(), beforeFilter(), and initViewClass().
Referenced by render().


| set | ( | $ | name, | |
| $ | value = null | |||
| ) |
set a variable to be available inside the view. the given name-string is the name of the global variable inside the view ('bla' => $bla)
| string | $name name of the variable that should be globally accessible inside the view | |
| mixed | $value contents of the variable |
Definition at line 305 of file controller.php.
References setPageTitle().

| setPageTitle | ( | $ | n | ) |
set the pagetitle for the current layout
| string | $n title |
Definition at line 296 of file controller.php.
Referenced by set(), and setRef().

| setRef | ( | $ | name, | |
| &$ | value | |||
| ) |
like set, but assignes the variable by reference (faster)
| string | $name name of the variable that should be globally accessible inside the view | |
| mixed | $value contents of the variable |
Definition at line 318 of file controller.php.
References setPageTitle().

| $action |
| $autoRender = true |
Definition at line 57 of file controller.php.
| $base |
Definition at line 98 of file controller.php.
| $basePath |
Definition at line 92 of file controller.php.
| $cache = null |
Definition at line 46 of file controller.php.
| $components = array() |
Definition at line 38 of file controller.php.
| $helpers = array('html') |
Definition at line 32 of file controller.php.
| $layout = 'default' |
which layout to use. null means an empty layout, otherwise kata will look for views/layouts/default.thtml
Definition at line 51 of file controller.php.
Referenced by render(), renderCachedHtml(), and renderView().
| $output = '' |
Definition at line 68 of file controller.php.
| $pageTitle = '' |
string with a pagetitle to render to the current layout ($title_for_layout inside the view)
Definition at line 103 of file controller.php.
| $params = null |
holds params (get,post,controller,action) of this request
Definition at line 62 of file controller.php.
| $uses = array() |
| $view = 'View' |
Definition at line 109 of file controller.php.
$viewClass = null [protected] |
Definition at line 115 of file controller.php.
| $viewVars = array() |
Definition at line 74 of file controller.php.
| $webroot |
Definition at line 86 of file controller.php.
1.5.8