Class FOFDispatcher

Description

FrameworkOnFramework dispatcher class

FrameworkOnFramework is a set of classes whcih extend Joomla! 1.5 and later's MVC framework with features making maintaining complex software much easier, without tedious repetitive copying of the same code over and over again.

  • since: 1.0

Located in /libraries/fof/dispatcher/dispatcher.php (line 21)

JObject
   |
   --FOFDispatcher
Variable Summary
Method Summary
 static FOFDispatcher &getAnInstance ([string $option = null], [string $view = null], [array $config = array()])
 static FOFDispatcher &getTmpInstance ([string $option = null], [string $view = null], [array $config = array()])
 static array isCliAdmin ()
 FOFDispatcher __construct ([array $config = array()])
 null|Exception dispatch ()
 string getTask (string $view)
 boolean onAfterDispatch ()
 boolean onBeforeDispatch ()
 boolean onBeforeDispatchCLI ()
Variables
array $config = array() (line 24)
  • var: Configuration variables
  • access: protected
string $defaultView = 'cpanel' (line 30)
  • var: The name of the default view, in case none is specified
  • access: public
array $fofAuth_AuthMethods = array(
/* HTTP Basic Authentication using encrypted information protected
* with a TOTP (the username must be "_fof_auth") */
'HTTPBasicAuth_TOTP',
/* Encrypted information protected with a TOTP passed in the
* _fofauthentication query string parameter */
'QueryString_TOTP',
/* HTTP Basic Authentication using a username and password pair in plain text */
'HTTPBasicAuth_Plaintext',
/* Plaintext, JSON-encoded username and password pair passed in the
* _fofauthentication query string parameter */
'QueryString_Plaintext',
/* Plaintext username and password in the _fofauthentication_username
* and _fofauthentication_username query string parameters */
'SplitQueryString_Plaintext',
)
(line 53)
  • var: Which methods to use to fetch authentication credentials and in which order
  • access: protected
array $fofAuth_Formats = array('json', 'csv', 'xml', 'raw') (line 42)
  • var: Which formats to be handled by transparent authentication
  • access: protected
string $fofAuth_Key = null (line 39)
  • var: The key for the TOTP, Base32 encoded (watch out; Base32, NOT Base64!)
  • access: protected
boolean $fofAuth_LogoutOnReturn = true (line 50)

Should I logout the transparently authenticated user on logout? Recommended to leave it on in order to avoid crashing the sessions table.

  • access: protected
int $fofAuth_timeStep = 6 (line 36)
  • var: The Time Step for the TOTP used in FOF's transparent user authentication
  • access: protected
FOFInput $input = array() (line 27)
  • var: Input variables
  • access: protected

Inherited Variables

Inherited from JObject

JObject::$_errors
Methods
static getAnInstance (line 87)

Get a static (Singleton) instance of a particular Dispatcher

  • staticvar: array $instances: Holds the array of Dispatchers FOF knows about
  • access: public
static FOFDispatcher &getAnInstance ([string $option = null], [string $view = null], [array $config = array()])
  • string $option: The component name
  • string $view: The View name
  • array $config: Configuration data
static getTmpInstance (line 110)

Gets a temporary instance of a Dispatcher

  • access: public
static FOFDispatcher &getTmpInstance ([string $option = null], [string $view = null], [array $config = array()])
  • string $option: The component name
  • string $view: The View name
  • array $config: Configuration data
static isCliAdmin (line 722)

Main function to detect if we're running in a CLI environment and we're admin

  • return: isCLI and isAdmin. It's not an associtive array, so we can use list.
  • access: public
static array isCliAdmin ()
Constructor __construct (line 185)

Public constructor

  • access: public
FOFDispatcher __construct ([array $config = array()])
  • array $config: The configuration variables

Redefinition of:
JObject::__construct()
Class constructor, overridden in descendant classes.
dispatch (line 256)

The main code of the Dispatcher. It spawns the necessary controller and runs it.

  • access: public
null|Exception dispatch ()
getTask (line 372)

Tries to guess the controller task to execute based on the view name and the HTTP request method.

  • return: The best guess of the task to execute
  • access: protected
string getTask (string $view)
  • string $view: The name of the view
onAfterDispatch (line 491)

Executes right after the dispatcher runs the controller.

  • return: Return false to abort
  • access: public
boolean onAfterDispatch ()
onBeforeDispatch (line 442)

Executes right before the dispatcher tries to instantiate and run the controller.

  • return: Return false to abort
  • access: public
boolean onBeforeDispatch ()
onBeforeDispatchCLI (line 452)

Sets up some environment variables, so we can work as usually on CLI, too.

  • return: Return false to abort
  • access: public
boolean onBeforeDispatchCLI ()
transparentAuthentication (line 508)

Transparently authenticates a user

  • access: public
void transparentAuthentication ()

Inherited Methods

Inherited From JObject

 JObject::__construct()
 JObject::def()
 JObject::get()
 JObject::getError()
 JObject::getErrors()
 JObject::getProperties()
 JObject::set()
 JObject::setError()
 JObject::setProperties()
 JObject::__toString()

Documentation generated on Tue, 19 Nov 2013 15:01:34 +0100 by phpDocumentor 1.4.3