Constructor
This function initializes the action parameters. It does not control execution other than that. Execution is managed within Krai_Module::DoAction().
Parameters:
API Tags:
Information Tags:
| Throws: | Krai_Module_Exception |
Filters to apply after the Display call
This function provides the ability for things to happen after the call to Krai_Module_Action::Display(). It should always call
parent::AfterFilters();
in order to allow stacking.
API Tags:
Filters to apply after any rendering takes place. If no render call is made, this is not executed.
This function provides the ability for things to happen after a rendering takes place via either Krai_Module_Action::Render() or Krai_Module_Action::RenderText() It should always call
parent::AfterRender();
in order to allow stacking.
API Tags:
Filters to apply before the validate call
This function provides the ability for things to happen before the call to Krai_Module_Action::Validate(). It should always call
parent::BeforeFilters();
in order to allow stacking.
API Tags:
Redefined in descendants as:
Filters to apply before any rendering takes place. If no render call is made, this is not executed.
This function provides the ability for things to happen before a rendering takes place via either Krai_Module_Action::Render() or Krai_Module_Action::RenderText() It should always call
parent::BeforeRender();
in order to allow stacking.
API Tags:
void RedirectSilent(
$_module,
$_action, [
$_params = array()], string
$module, string
$action, array
$params
)
|
|
Execute a redirect behind the scenes
This function executes a redirect by means of the Krai_Module::RedirectSilent() function. See that function for details.
Parameters:
|
string |
$module: |
The name of the module |
|
string |
$action: |
The name of the action |
|
array |
$params: |
The array of parameters |
|
|
$_module: |
|
|
|
$_action: |
|
|
array |
$_params: |
|
API Tags:
void RedirectTo(
string
$module, [string
$action = null], [
$params = array()]
)
|
|
Execute a redirect
This function executes a redirect by means of the Krai_Module::RedirectTo() function. See that function for details.
Parameters:
|
string |
$module: |
The name of the module or the url |
|
string |
$action: |
The name of the action or null to use a url |
|
array |
$params: |
The array of parameters |
API Tags:
void Render(
string
$_file, [boolean
$_templated = true]
)
|
|
Render a file with or without a template
This function is responsible for rendering a view file, optionally with a template. It should only be called if neither it nor Krai_Module_Action::RenderText() was previously called in the application flow. Before rendering the file, it passes off to Krai_Module_Action::BeforeRender(). It throws a Krai_Module_Exception_Adone, so it generally will not return to the action application flow.
The filename passed with be prefixed with Krai::$MODULES and verified to be within the Krai::$APPDIR directory. Additionally, the name of the layout file (whether passed or default) will be prefixed with Krai::$LAYOUTS and also verified to live within the application root Krai::$APPDIR.
Parameters:
|
string |
$_file: |
The name of the file to be rendered |
|
boolean |
$_templated: |
The name of the layout to use or true to use the default layout or false to use no layout |
API Tags:
Information Tags:
| Throws: | Krai_Module_Exception |
| Throws: | Krai_Module_Exception_Adone |
void RenderPartial(
string
$_file, [mixed
$_collection = array()], [
$_locals = array()]
)
|
|
Renders a partial file
This function provides the ability to render a "partial" within another render. It accepts some data and assigns that to a local variable based on the name of the partial file that will be available within the scope of the partial file. If an array of data is passed, it will include the partial file once for each element of the array.
The filename passed with be prefixed with Krai::$MODULES and verified to be within the Krai::$APPDIR directory.
Parameters:
|
string |
$_file: |
The name of the partial file |
|
mixed |
$_collection: |
The data for the partial file |
|
array |
$_locals: |
Some other local variables that will be available to the partial file in the form of varname => value pairs |
API Tags:
void RenderText(
string
$_text, [boolean
$_templated = true]
)
|
|
Renders some text with or without a template
This function is responsible for rendering some text (e.g. JSON), optionally with a template. It should only be called if neither it nor Krai_Module_Action::Render() was previously called in the application flow. Before rendering the file, it passes off to Krai_Module_Action::BeforeRender(). It throws a Krai_Module_Exception_Adone, so it generally will not return to the action application flow.
The name of the layout file (whether passed or default) will be prefixed with Krai::$LAYOUTS and verified to live within the application root Krai::$APPDIR.
Parameters:
|
string |
$_text: |
The text to be rendered |
|
boolean |
$_templated: |
The name of the layout or true to use the default layout or false to use no layout |
API Tags:
Information Tags:
| Throws: | Krai_Module_Exception |
| Throws: | Krai_Module_Exception_Adone |