Class Controller

Description

Class which handles incoming requests and drives the MVC strategy for building the model and assigning to a view.

Located in /system/classes/controller.php (line 9)

Singleton
   |
   --Controller
Variable Summary
mixed $base_url
Method Summary
static void dispatch_request ()
static string get_action ()
static string get_base_url ()
static string get_full_url ()
static object handler get_handler ()
static array get_handler_vars ()
static string get_stub ()
static mixed get_var (string $name)
static void instance ()
static void parse_request ()
Variables
mixed $base_url = '' (line 10)
  • access: public
Methods
static method dispatch_request (line 163)

Handle the requested action by firing off the matched handler action(s)

  • access: public
static void dispatch_request ()
static method get_action (line 56)

Returns the action

  • return: name of action
  • access: public
static string get_action ()
static method get_base_url (line 29)

Returns the base URL

  • return: base URL
  • access: public
static string get_base_url ()
static method get_full_url (line 47)

Returns the full requested URL

  • return: The full requested URL
  • access: public
static string get_full_url ()
static method get_handler (line 65)

Returns the action handler

  • return: object
  • access: public
static object handler get_handler ()
static method get_handler_vars (line 74)

Returns the action handler's variables

  • return: variables used by handler
  • access: public
static array get_handler_vars ()
static method get_stub (line 38)

Returns the stub in its entirety

  • return: the URL incoming stub
  • access: public
static string get_stub ()
static method get_var (line 85)

A convenience method for returning a handler variable (handler_var).

This includes parameters set on the url, and fields submitted by POST. The alternative to this, while possible to write, is just too long.

  • return: The value of that variable in the handler
  • access: public
static mixed get_var (string $name)
  • string $name: The name of the variable to return.
static method instance (line 20)

Enables singleton working properly

static void instance ()

Redefinition of:
Singleton::instance()
Declarations that extend this method must have the same signature (arguments and returned types) to pass E_STRICT
static method parse_request (line 94)

Parses the requested URL. Automatically translates URLs coming in from mod_rewrite and parses out any action and parameters in the slug.

  • access: public
static void parse_request ()

Inherited Methods

Inherited From Singleton

Singleton::__construct()
Singleton::getInstanceOf()
Singleton::instance()

Documentation generated on Thu, 30 Oct 2008 20:31:07 +0100 by phpDocumentor 1.3.2