Static Public Member Functions | Public Attributes | Static Protected Member Functions

Controller Class Reference

Inheritance diagram for Controller:
Collaboration diagram for Controller:

List of all members.

Static Public Member Functions

static get_base_url ()
static get_stub ()
static get_full_url ()
static get_action ()
static get_handler ()
static get_handler_vars ()
static get_var ($name, $default=null)
static get_matched_rule ()
static parse_request ()
static dispatch_request ()
static get_request_obj ()

Public Attributes

 $base_url = ''

Static Protected Member Functions

static instance ()

Detailed Description

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

Definition at line 15 of file controller.php.


Member Function Documentation

static Controller::dispatch_request (  )  [static]

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

Definition at line 202 of file controller.php.

static Controller::get_action (  )  [static]

Returns the action

Returns:
string name of action

Definition at line 67 of file controller.php.

Referenced by Pingback::action_add_template_vars().

static Controller::get_base_url (  )  [static]

Returns the base URL

Returns:
string base URL

Definition at line 37 of file controller.php.

static Controller::get_full_url (  )  [static]

Returns the full requested URL

Returns:
string The full requested URL

Definition at line 57 of file controller.php.

Referenced by Utils::redirect().

static Controller::get_handler (  )  [static]

Returns the action handler

Returns:
handler object

Definition at line 77 of file controller.php.

Referenced by Theme::act_display_date(), and Theme::add_template_vars().

static Controller::get_handler_vars (  )  [static]

Returns the action handler's variables

Returns:
array variables used by handler

Definition at line 87 of file controller.php.

Referenced by Theme::act_display(), Theme::act_search(), CoreDashModules::action_admin_header(), AtomHandler::create_atom_wrapper(), dispatch_request(), and AtomHandler::get_collection().

static Controller::get_matched_rule (  )  [static]

A convenience method for returning the rewrite rule that matches the requested URL

Returns:
|null The rule that matches the requested URL

Definition at line 109 of file controller.php.

Referenced by RestHandler::act_rest(), RestHandler::act_verified_rest(), and Menus::filter_menu_type_data().

static Controller::get_request_obj (  )  [static]

Get an object that represents the request made

Returns:
stdClass An object with properties named after rewrite rules, which are true if those rules were used to handle the current request

Definition at line 215 of file controller.php.

Referenced by ActionHandler::setup_theme().

static Controller::get_stub (  )  [static]

Returns the stub in its entirety

Returns:
string the URL incoming stub

Definition at line 47 of file controller.php.

Referenced by FormUI::get(), and get_full_url().

static Controller::get_var ( name,
default = null 
) [static]

A convenience method for returning a handler variable (handler_var). This includes only parameters set on the url. The alternative to this, while possible to write, is just too long.

Parameters:
string $name The name of the variable to return.
mixed $default A default value to return if the variable is not set.
Returns:
mixed The value of that variable in the handler

Definition at line 100 of file controller.php.

Referenced by Theme::act_display_date(), Theme::act_display_tag(), SpamChecker::action_comment_insert_before(), URL::get(), AdminGroupsHandler::get_group(), AdminPluginsHandler::get_plugins(), AdminThemesHandler::get_themes(), Format::more(), and Theme::theme_feed_alternate().

static Controller::instance (  )  [static, protected]

Enables singleton working properly

See also:
singleton.php

Reimplemented from Singleton.

Definition at line 27 of file controller.php.

Referenced by dispatch_request(), get_action(), get_base_url(), get_handler(), get_handler_vars(), get_matched_rule(), get_stub(), get_var(), and parse_request().

static Controller::parse_request (  )  [static]

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

Definition at line 119 of file controller.php.


The documentation for this class was generated from the following file: