Claro_FrontController Class Reference

Public Member Functions

 bind ($request, Claro_Controller $controller, $overwrite=false)
 setDefault ($request)
 unbind ($request)
 serve ($request=null)

Static Public Member Functions

static getInstance ($initConfig=null)

Protected Member Functions

 __construct ($initConfig=null)

Protected Attributes

 $registry = array()
 $defaultController = false

Static Protected Attributes

static $_instance = false

Detailed Description

Rudimentary Front Controller for Claroline applications This class is a Singleton !

Bind a requested controller to the Claro_Controller instance Serve a requested controller

Definition at line 105 of file controller.lib.php.


Constructor & Destructor Documentation

__construct ( initConfig = null  )  [protected]

Constructor

Parameters:
initConfig array initial controllers array

Definition at line 129 of file controller.lib.php.


Member Function Documentation

bind ( request,
Claro_Controller controller,
overwrite = false 
)

Bind the given Claro_Controller to the given requestable key

Parameters:
string $request requestable key
Claro_Controller $controller
bool $overwrite set to true to overwrite an existing binding, default false
Exceptions:
Claro_FrontController_Exception if try to overwrite a controller and $overwrite set to false
Returns:
void

Definition at line 145 of file controller.lib.php.

static getInstance ( initConfig = null  )  [static]

Get the Front Controller singleton instance

Definition at line 112 of file controller.lib.php.

serve ( request = null  ) 

Exceute the controller bound to the requested key

Parameters:
string $request requestable key, if null, trys to serve the default Controller if any
Exceptions:
Claro_FrontController_Exception if if the requested key is not bound
Returns:
string controller output

Definition at line 202 of file controller.lib.php.

setDefault ( request  ) 

Set the given requestable key as default

Parameters:
string $request requestable key
Exceptions:
Claro_FrontController_Exception if if the requestable key is not bound
Returns:
void

Definition at line 163 of file controller.lib.php.

unbind ( request  ) 

Unbind the given requestable key

Parameters:
string $request requestable key
Exceptions:
Claro_FrontController_Exception if if the requestable key is not bound
Returns:
Claro_Controller unbound controller

Definition at line 181 of file controller.lib.php.


Field Documentation

$_instance = false [static, protected]

Definition at line 107 of file controller.lib.php.

$defaultController = false [protected]

Definition at line 123 of file controller.lib.php.

$registry = array() [protected]

Definition at line 122 of file controller.lib.php.


The documentation for this class was generated from the following file:
Generated on Tue Jun 8 12:28:38 2010 for Claroline API by  doxygen 1.6.3