SproutCMS

This is the code documentation for the SproutCMS project

Page options:

Inherited members

class Router

Router

Variables

NameVisibilityDescription
$MODE (static) 
$arguments (static)
Arguments to pass to controller method
$complete_uri (static)
Original URI and query string combined.
$controller (static)
Controller to use
$current_uri (static)
The original URI requested e.g. by a HTTP user agent or via CLI
$method (static)
Method to call on controller
$query_string (static)
Original query string requested by HTTP user agent
$routed_uri (static)
Controller/method URI to use, from the configured routes
$router (static) 
$url_suffix (static)
Optional fake file extension that will be added to all generated URLs, e.g. '.html'

Functions

NameVisibilityDescription
findUripublic (static)Attempts to determine the current URI using CLI, GET, PATH_INFO, ORIG_PATH_INFO, or PHP_SELF.
getRoutespublic (static)Get the routes tables.
originCleanuppublic (static)Redirect to alternate hostname and/or protocol if requred
originCleanupDebugprivate (static)Output information about origin cleanup, and then exit
routedUripublic (static)Generates routed URI (i.e. controller/method/arg1/arg2/...) from given URI.
setuppublic (static)Router setup routine; determines controller/method from URI.

public findUri

void Router::findUri ( );

Attempts to determine the current URI using CLI, GET, PATH_INFO, ORIG_PATH_INFO, or PHP_SELF.

public getRoutes

array Router::getRoutes ( );

Get the routes tables.

public originCleanup

void Router::originCleanup ( );

Redirect to alternate hostname and/or protocol if requred

The actual business rules for the desired protocol/hostname is defined in
the BootstrapConfig class which is located at config/_bootstrap_config.php

private originCleanupDebug

void Router::originCleanupDebug ( string $old_proto , string $old_hostname , string $new_proto , string $new_hostname );

Output information about origin cleanup, and then exit
This is turned on by the BootstrapConfig::ORIGIN_CLEANUP_DEBUG constant

public routedUri

string|bool Router::routedUri ( string $uri );

Generates routed URI (i.e. controller/method/arg1/arg2/...) from given URI.

public setup

void Router::setup ( );

Router setup routine; determines controller/method from URI.
Automatically called during Kohana setup process.