mojavi
[ class tree: mojavi ] [ index: mojavi ] [ all elements ]

Class: Controller

Source Location: /Controller.class.php

Class Overview


Controller dispatches requests to the proper action and controls application flow.


Author(s):

  • Sean Kerr

Methods


Inherited Variables

Inherited Methods


Class Details

[line 201]
Controller dispatches requests to the proper action and controls application flow.



<note> This class does not need to be included. It is part of the main library. </note>




Tags:

since:  1.0
author:  Sean Kerr


[ Top ]


Class Methods


method actionExists [line 367]

bool actionExists( string $modName, string $actName)

Determine if an action exists.



Tags:

return:  TRUE, if the given module has the given action, otherwise FALSE.
since:  1.0
access:  public


Parameters:

string   $modName   A module name.
string   $actName   An action name.

[ Top ]

method dispatch [line 394]

void dispatch( [string $modName = NULL], [string $actName = NULL])

Dispatch a request.



<note> Optional parameters for module and action exist if you wish to run Mojavi as a page controller.



This method should never be called manually. </note>




Parameters:

string   $modName   A module name.
string   $actName   An action name.

[ Top ]

method forward [line 537]

void forward( string $modName, string $actName)

Forward the request to an action.



Tags:

since:  2.0
access:  public


Parameters:

string   $modName   A module name.
string   $actName   An action name.

[ Top ]

method genURL [line 666]

string genURL( array $params)

Generate a formatted Mojavi URL.



Tags:

return:  A URL to a Mojavi resource.
since:  1.0
access:  public


Parameters:

array   $params   An associative array of URL parameters.

[ Top ]

method getAction [line 722]

Action &getAction( string $modName, string $actName)

Retrieve an action implementation instance.



Tags:

return:  An Action instance, if the action exists, otherwise an error will be reported.
since:  1.0
access:  public


Parameters:

string   $modName   A module name.
string   $actName   An action name.

[ Top ]

method getAuthorizationHandler [line 757]

AuthorizationHandler &getAuthorizationHandler( )

Retrieve the developer supplied authorization handler.



Tags:

return:  An AuthorizationHandler instance, if an authorization handler has been set, otherwise NULL.
since:  2.0
access:  public


[ Top ]

method getContentType [line 770]

void getContentType( )

Retrieve the user supplied content type.



Tags:

since:  1.0
access:  public


[ Top ]

method getControllerPath [line 789]

string getControllerPath( [string $modName = NULL], [string $actName = NULL])

Retrieve an absolute web path to the public controller file.



Tags:

return:  An absolute web path representing the controller file, which also includes module and action names.
since:  1.0
access:  public


Parameters:

string   $modName   A module name.
string   $actName   An action name.

[ Top ]

method getCurrentAction [line 831]

void getCurrentAction( )

Retrieve the name of the currently processing action.



<note> If the request has not been forwarded, this will return the the originally requested action. </note>




Tags:

since:  1.0
access:  public


[ Top ]

method getCurrentModule [line 851]

void getCurrentModule( )

Retrieve the name of the currently processing module.



<note> If the request has not been forwarded, this will return the originally requested module. </note>




Tags:

since:  1.0
access:  public


[ Top ]

method getExecutionChain [line 866]

ExecutionChain &getExecutionChain( )

Retrieve the execution chain.



Tags:

return:  An ExecutionChain instance.
since:  1.0
access:  public


[ Top ]

method getInstance [line 883]

Controller &getInstance( [string $contentType = 'html'])

Retrieve the single instance of Controller.



Tags:

return:  A Controller instance.
since:  2.0
access:  public


Parameters:

string   $contentType   A user supplied content type.

[ Top ]

method getModuleDir [line 916]

string getModuleDir( )

Retrieve an absolute file-system path home directory of the currently processing module.



<note> If the request has been forwarded, this will return the directory of the forwarded module. </note>




Tags:

return:  A module directory.
since:  2.0
access:  public


[ Top ]

method getMojavi [line 931]

array &getMojavi( )

Retrieve the Mojavi associative array.



Tags:

return:  An associative array of template-ready data.
since:  1.0
access:  public


[ Top ]

method getRenderMode [line 957]

int getRenderMode( )

Retrieve the global render mode.



<note> This will return NULL unless specifically set. </note>




Tags:

return:  

One of the two possible render modes:

  • RENDER_CLIENT - render to the client
  • RENDER_VAR - render to variable

since:  2.0
access:  public


[ Top ]

method getRequest [line 972]

Request &getRequest( )

Retrieve the request instance.



Tags:

return:  A Request instance.
since:  1.0
access:  public


[ Top ]

method getRequestAction [line 987]

string getRequestAction( )

Retrieve the name of the originally requested action.



Tags:

return:  An action name.
since:  1.0
access:  public


[ Top ]

method getRequestModule [line 1002]

string getRequestModule( )

Retrieve the name of the originally requested module.



Tags:

return:  A module name.
since:  1.0
access:  public


[ Top ]

method getSessionHandler [line 1018]

SessionHandler &getSessionHandler( )

Retrieve the developer supplied session handler.



Tags:

return:  A SessionHandler instance, if a session handler has been set, otherwise NULL.
since:  2.0
access:  public


[ Top ]

method getUser [line 1033]

User &getUser( )

Retrieve the currently requesting user.



Tags:

return:  A User instance.
since:  1.0
access:  public


[ Top ]

method getView [line 1049]

View &getView( string $modName, string $actName, string $viewName)

Retrieve a view implementation instance.



Tags:

return:  A View instance.


Parameters:

string   $modName   A module name.
string   $actName   An action name.
string   $viewName   A view name.

[ Top ]

method redirect [line 1241]

void redirect( string $url)

Redirect the request to another location.



Tags:

since:  2.0
access:  public


Parameters:

string   $url   A URL.

[ Top ]

method setAuthorizationHandler [line 1256]

void setAuthorizationHandler( Authorizationhandler &$handler)

Set the developer supplied authorization handler.



Tags:

since:  2.0
access:  public


Parameters:

Authorizationhandler   &$handler   An AuthorizationHandler instance.

[ Top ]

method setContentType [line 1271]

void setContentType( string $contentType)

Set the content type.



Tags:

since:  1.0
access:  public


Parameters:

string   $contentType   A user supplied content type.

[ Top ]

method setRenderMode [line 1288]

void setRenderMode( int $mode)

Set the global render mode.



Parameters:

int   $mode  

Global render mode, which is one of the following two:

  • RENDER_CLIENT - render to the client
  • RENDER_VAR - render to variable


[ Top ]

method setSessionHandler [line 1303]

void setSessionHandler( SessionHandler &$handler)

Set the session handler.



Tags:

since:  2.0
access:  public


Parameters:

SessionHandler   &$handler   A SessionHandler instance.

[ Top ]

method setUser [line 1318]

void setUser( User &$user)

Set the user type.



Tags:

since:  2.0
access:  public


Parameters:

User   &$user   A User instance.

[ Top ]

method viewExists [line 1409]

bool viewExists( string $modName, string $actName, string $viewName)

Determine if a view exists.



Tags:

return:  TRUE, if the view exists, otherwise FALSE.
since:  1.0
access:  public


Parameters:

string   $modName   A module name.
string   $actName   An action name.
string   $viewName   A view name.

[ Top ]


Documentation generated on Wed, 15 Jun 2005 11:43:21 +0900 by phpDocumentor 1.2.3