Welcome, Guest Log In

Class Krai_Module

Class Overview

Module base class

This class is the base of the modules in any application. It controls execution of Krai_Action instances, and provides filtering and redirection abilities.

Located in /Krai/Module.php [line 28]

Krai
   |
   --Krai_Module
Author(s):
API Tags:
Abstract:  

Methods

[ Top ]
Descendants
Child Class Description
ApplicationModule The initial application module.

[ Top ]
Inherited Properties, Constants, and Methods
Inherited Properties Inherited Methods Inherited Constants

Inherited From Krai

Krai::$APPDIR
Krai::$DB
Krai::$DB_DEFAULT
Krai::$FRAMEWORK
Krai::$GET
Krai::$INCLUDES
Krai::$INFLECTOR
Krai::$LAYOUTS
Krai::$MODULES
Krai::$PARAMS
Krai::$POST
Krai::$REQUEST
Krai::$ROUTER
Krai::$STARTTIME
Krai::$_BACKLOGS
Krai::$_CONFIG
Krai::$_LOGGING
Krai::$_MESSAGES
Krai::$_MIMESET
Krai::$_NAKOR_CORE
Krai::$_SETUP
Krai::$_STARTED

Inherited From Krai

Krai::AssocImplode()
A function to implode an associative array preserving keys
Krai::AutoLoad()
Loads the file for a module or action name
Krai::DetermineRequest()
Determines the request to be used from server variables.
Krai::EndRun()
Ends the application run after cleaning up
Krai::Error()
Save an error message
Krai::GetConfig()
Gets information from the configuration array Krai::$_CONFIG.
Krai::GetErrors()
Returns the logged errors
Krai::GetNotices()
Returns the logged notices
Krai::IsErrors()
Determine whether there are errors or not
Krai::IsNotices()
Determine whether there are notices or not
Krai::LoadActionFile()
Tries to load the file for an action
Krai::LoadModuleFile()
Tries to load the file for a module
Krai::Notice()
Save a notice message
Krai::ReloadMessages()
Reloads messages from session if available
Krai::Run()
Makes everything start up and work
Krai::SaveMessages()
Saves messages to the session
Krai::SetMime()
Sets the mime-type header for the response
Krai::Setup()
This is the configuration function for the framework.
Krai::Uses()
A wrapper for including files and logging such. Uses http://www.php.net/func_get_args() for variable argument number.
Krai::WriteBackLogs()
Writes the back logs to the logger
Krai::WriteLog()
Provides an interface to the loghandler, whatever that might be.

Inherited From Krai

Krai::LOG_ALERT
Krai::LOG_CRITICAL
Krai::LOG_DEBUG
Krai::LOG_EMERG
Krai::LOG_ERROR
Krai::LOG_INFO
Krai::LOG_NOTICE
Krai::LOG_WARNING

[ Top ]
Method Summary
void   AfterFilters()   Executes arbitrary commands after the action instance has been completed.
void   BeforeFilters()   Executes arbitrary commands before the action instance is created.
void   DoAction()   Perform an action from this module
void   RedirectSilent()   Execute a redirect behind the scenes
void   RedirectTo()   Execute a redirect

[ Top ]
Methods
AfterFilters  [line 121]

  void AfterFilters( )

Executes arbitrary commands after the action instance has been completed.

This function provides the ability to tack on operations to the end of the execution of an action for example, for the purpose of cleaning up file handles


API Tags:
Access:  protected


Redefined in descendants as:

[ Top ]
BeforeFilters  [line 110]

  void BeforeFilters( )

Executes arbitrary commands before the action instance is created.

This function provides the ability to interject operations such as validating logins or initializing tools before the action is executed.


API Tags:
Access:  protected


Redefined in descendants as:

[ Top ]
DoAction  [line 40]

  void DoAction( string $action, string $requestmethod  )

Perform an action from this module

This function executes an action which belongs to the module instance.

Parameters:
string   $action:  The name of the action to execute
string   $requestmethod:  The method of the request (GET or POST)

API Tags:
Access:  public

Information Tags:
Throws:  Krai_Module_Exception_Mdone

[ Top ]
RedirectSilent  [line 163]

  void RedirectSilent( string $module, string $action, [ $params = array()]  )

Execute a redirect behind the scenes

This function executes a redirect to another module/action pair behind the scenes. The browser is not redirected, just the script execution.

Parameters:
string   $module:  The module to redirect to
string   $action:  The action to execute
array   $params:  The parameters for the request

API Tags:
Access:  public

Information Tags:
Throws:  Krai_Module_Exception_Adone

[ Top ]
RedirectTo  [line 137]

  void RedirectTo( string $module, [string $action = null], [ $params = array()]  )

Execute a redirect

This function executes a redirect via a Location header. It can redirect to another module/action/params target as generated by Krai_Router::UrlFor(), or to an arbitrary URL by passing that url as the only parameter.

Parameters:
string   $module:  The module or URL to redirect to
string   $action:  The action to redirect to
array   $params:  The parameters for generating the url

API Tags:
Access:  public

Information Tags:
Throws:  Krai_Module_Exception_Adone

[ Top ]

Documentation generated on Fri, 25 Jul 2008 15:19:37 -0400 by phpDocumentor 1.4.2
Krai Framework site admin credits sitemap valid xhtml?