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

Class: Controller

Source Location: /controller/Controller.class.php

Class Overview

MojaviObject
   |
   --Controller

Controller directs application flow.


Author(s):

  • Sean Kerr (skerr@mojavi.org)

Version:

  • $Id: Controller.class.php 777 2005-08-17 15:26:07Z seank $

Copyright:

Variables

Methods


Child classes:

ConsoleController
WebController
WebController provides web specific methods to Controller such as, url redirection.

Inherited Methods

Class: MojaviObject

MojaviObject::toString()
Retrieve a string representation of this object.

Class Details

[line 23]
Controller directs application flow.



Tags:

abstract:  
version:  $Id: Controller.class.php 777 2005-08-17 15:26:07Z seank $
since:  1.0.0
copyright:  (c) Sean Kerr, http://www.mojavi.org
author:  Sean Kerr (skerr@mojavi.org)


[ Top ]


Class Variables

$context =  null

[line 32]


Type:   mixed


[ Top ]

$databaseManager =  null

[line 33]


Type:   mixed


[ Top ]

$maxForwards =  20

[line 34]


Type:   mixed


[ Top ]

$renderMode =  View::RENDER_CLIENT

[line 35]


Type:   mixed


[ Top ]

$request =  null

[line 36]


Type:   mixed


[ Top ]

$securityFilter =  null

[line 37]


Type:   mixed


[ Top ]

$storage =  null

[line 38]


Type:   mixed


[ Top ]

$user =  null

[line 39]


Type:   mixed


[ Top ]



Class Methods


method actionExists [line 59]

bool actionExists( string $moduleName, string $actionName)

Indicates whether or not a module has a specific action.



Tags:

return:  true, if the action exists, otherwise false.
access:  public
since:  1.0.0
author:  Sean Kerr (skerr@mojavi.org)


Parameters:

string   $moduleName   A module name.
string   $actionName   An action name.

[ Top ]

method forward [line 92]

void forward( string $moduleName, string $actionName)

Forward the request to another action.



Tags:

since:  1.0.0
access:  public
author:  Sean Kerr (skerr@mojavi.org)
throws:  ConfigurationException If an invalid configuration setting has been found.
throws:  InitializationException If the action could not be initialized.
throws:  ForwardException If an error occurs while forwarding the request.
throws:  SecurityException If the action requires security but the user implementation is not of type SecurityUser.


Parameters:

string   $moduleName   A module name.
string   $actionName   An action name.

[ Top ]

method getAction [line 301]

Action getAction( string $moduleName, string $actionName)

Retrieve an Action implementation instance.



Tags:

return:  An Action implementation instance, if the action exists, otherwise null.
access:  public
since:  3.0.0
author:  Sean Kerr (skerr@mojavi.org)


Parameters:

string   $moduleName   A module name.
string   $actionName   An action name.

[ Top ]

method getActionStack [line 345]

ActionStack getActionStack( )

Retrieve the action stack.



Tags:

return:  An ActionStack instance, if the action stack is enabled, otherwise null.
access:  public
since:  3.0.0
author:  Sean Kerr (skerr@mojavi.org)


[ Top ]

method getContext [line 362]

Context getContext( )

Retrieve the current application context.



Tags:

return:  A Context instance.
access:  public
since:  3.0.0
author:  Sean Kerr (skerr@mojavi.org)


[ Top ]

method getGlobalModel [line 382]

Model getGlobalModel( string $modelName)

Retrieve a global Model implementation instance.



Tags:

return:  A Model implementation instance, if the model exists, otherwise null.
access:  public
since:  3.0.0
author:  Sean Kerr (skerr@mojavi.org)


Parameters:

string   $modelName   A model name.

[ Top ]

method getInstance [line 412]

Controller getInstance( )

Retrieve the singleton instance of this class.



Tags:

return:  A Controller implementation instance.
static:  
access:  public
since:  3.0.0
author:  Sean Kerr (skerr@mojavi.org)
throws:  ControllerException If a controller implementation instance has not been created.


[ Top ]

method getModel [line 443]

Model getModel( string $moduleName, string $modelName)

Retrieve a Model implementation instance.



Tags:

return:  A Model implementation instance, if the model exists, otherwise null.
access:  public
since:  3.0.0
author:  Sean Kerr (skerr@mojavi.org)


Parameters:

string   $moduleName   A module name.
string   $modelName   A model name.

[ Top ]

method getRenderMode [line 483]

int getRenderMode( )

Retrieve the presentation rendering mode.



Tags:

return:  One of the following:
  • View::RENDER_CLIENT
  • View::RENDER_VAR
access:  public
since:  1.0.0
author:  Sean Kerr (skerr@mojavi.org)


[ Top ]

method getView [line 504]

View getView( string $moduleName, string $viewName)

Retrieve a View implementation instance.



Tags:

return:  A View implementation instance, if the model exists, otherwise null.
access:  public
since:  3.0.0
author:  Sean Kerr (skerr@mojavi.org)


Parameters:

string   $moduleName   A module name.
string   $viewName   A view name.

[ Top ]

method initialize [line 547]

void initialize( )

Initialize this controller.



Tags:

access:  protected
since:  3.0.0
author:  Sean Kerr (skerr@mojavi.org)


Overridden in child classes as:

WebController::initialize()
Initialize this controller.

[ Top ]

method modelExists [line 690]

bool modelExists( string $moduleName, string $modelName)

Indicates whether or not a module has a specific model.



Tags:

return:  true, if the model exists, otherwise false.
access:  public
since:  1.0.0
author:  Sean Kerr (skerr@mojavi.org)


Parameters:

string   $moduleName   A module name.
string   $modelName   A model name.

[ Top ]

method moduleExists [line 712]

bool moduleExists( string $moduleName)

Indicates whether or not a module exists.



Tags:

return:  true, if the module exists, otherwise false.
access:  public
since:  1.0.0
author:  Sean Kerr (skerr@mojavi.org)


Parameters:

string   $moduleName   A module name.

[ Top ]

method newInstance [line 736]

Controller newInstance( string $class)

Retrieve a new Controller implementation instance.



Tags:

return:  A Controller implementation instance.
static:  
access:  public
since:  3.0.0
author:  Sean Kerr (skerr@mojavi.org)
throws:  FactoryException If a new controller implementation instance cannot be created.


Parameters:

string   $class   A Controller implementation name.

[ Top ]

method setRenderMode [line 808]

void setRenderMode( int $mode)

Set the presentation rendering mode.



Tags:

access:  public
since:  2.0.0
author:  Sean Kerr (skerr@mojavi.org)
throws:  RenderException
  • If an invalid render mode has been set.


Parameters:

int   $mode   A rendering mode.

[ Top ]

method shutdown [line 839]

void shutdown( )

Execute the shutdown procedure.



Tags:

access:  public
since:  3.0.0
author:  Sean Kerr (skerr@mojavi.org)


[ Top ]

method viewExists [line 871]

bool viewExists( string $moduleName, string $viewName)

Indicates whether or not a module has a specific view.



Tags:

return:  true, if the view exists, otherwise false.
access:  public
since:  3.0.0
author:  Sean Kerr (skerr@mojavi.org)


Parameters:

string   $moduleName   A module name.
string   $viewName   A view name.

[ Top ]


Documentation generated on Tue, 21 Feb 2006 01:45:13 +0900 by phpDocumentor 1.3.0RC5