class JRouterSite extends JRouter


Located at : UKNOWVA_ROOT/includes/router.php

Class to create and parse routes for the site application

Methods

__construct($options = array())

Class constructor

from JRouter
string
__toString()

Magic method to convert the object to a string gracefully.

from JObject
mixed
def(string $property, mixed $default = null)

Sets a default value if not alreay assigned

from JObject
mixed
get(string $property, mixed $default = null)

Returns a property of the object or the default value if the property is not set.

from JObject
array
getProperties(boolean $public = true)

Returns an associative array of object properties.

from JObject
string
getError(integer $i = null, boolean $toString = true)

Get the most recent error message.

from JObject
array
getErrors()

Return all errors, if any.

from JObject
mixed
set(string $property, mixed $value = null)

Modifies a property of the object, creating it if it does not already exist.

from JObject
boolean
setProperties(mixed $properties)

Set the object properties based on a named array/hash.

from JObject
void
setError(string $error)

Add an error message.

from JObject
string
toString() deprecated

No description

from JObject
static JRouter
getInstance(string $client, array $options = array())

Returns the global JRouter object, only creating it if it doesn't already exist.

from JRouter
array
parse($uri)

Parse the URI

string
build(string $url)

Function to convert an internal URI to a route

getMode()

Get the router mode

from JRouter
setMode($mode)

Set the router mode

from JRouter
setVar(string $key, mixed $value, boolean $create = true)

Set a router variable, creating it if it doesn't exist

from JRouter
setVars(array $vars = array(), boolean $merge = true)

Set the router variable array

from JRouter
mixed
getVar(string $key)

Get a router variable

from JRouter
array
getVars()

Get the router variable array

from JRouter
attachBuildRule(string $callback)

Attach a build rule

from JRouter
attachParseRule(string $callback)

Attach a parse rule

from JRouter

Details

in JRouter at line 61
JObject __construct($options = array())

Class constructor

Parameters

$options

Return Value

JObject

in JObject at line 56
string __toString()

Magic method to convert the object to a string gracefully.

Return Value

string The classname.

in JObject at line 70
mixed def(string $property, mixed $default = null)

Sets a default value if not alreay assigned

Parameters

string $property The name of the property.
mixed $default The default value.

Return Value

mixed

in JObject at line 88
mixed get(string $property, mixed $default = null)

Returns a property of the object or the default value if the property is not set.

Parameters

string $property The name of the property.
mixed $default The default value.

Return Value

mixed The value of the property.

See also

getProperties()

in JObject at line 107
array getProperties(boolean $public = true)

Returns an associative array of object properties.

Parameters

boolean $public If true, returns only the public properties.

Return Value

array

See also

get()

in JObject at line 133
string getError(integer $i = null, boolean $toString = true)

Get the most recent error message.

Parameters

integer $i Option error index.
boolean $toString Indicates if JError objects should return their error message.

Return Value

string Error message

in JObject at line 165
array getErrors()

Return all errors, if any.

Return Value

array Array of error messages or JErrors.

in JObject at line 180
mixed set(string $property, mixed $value = null)

Modifies a property of the object, creating it if it does not already exist.

Parameters

string $property The name of the property.
mixed $value The value of the property to set.

Return Value

mixed Previous value of the property.

in JObject at line 198
boolean setProperties(mixed $properties)

Set the object properties based on a named array/hash.

Parameters

mixed $properties Either an associative array or another object.

Return Value

boolean

See also

set()

in JObject at line 222
void setError(string $error)

Add an error message.

Parameters

string $error Error message.

Return Value

void

in JObject at line 235
string toString() deprecated

deprecated 12.1 Use magic method __toString()

Return Value

string

See also

__toString()

in JRouter at line 81
static JRouter getInstance(string $client, array $options = array())

Returns the global JRouter object, only creating it if it doesn't already exist.

Parameters

string $client The name of the client
array $options An associative array of options

Return Value

JRouter A JRouter object.

at line 29
array parse($uri)

Parse the URI

Parameters

$uri

Return Value

array @since 11.1

at line 82
string build(string $url)

Function to convert an internal URI to a route

Parameters

string $url The internal URL

Return Value

string The absolute search engine friendly URL

in JRouter at line 182
getMode()

Get the router mode

in JRouter at line 194
setMode($mode)

Set the router mode

Parameters

$mode

in JRouter at line 210
setVar(string $key, mixed $value, boolean $create = true)

Set a router variable, creating it if it doesn't exist

Parameters

string $key The name of the variable
mixed $value The value of the variable
boolean $create If True, the variable will be created if it doesn't exist yet

in JRouter at line 228
setVars(array $vars = array(), boolean $merge = true)

Set the router variable array

Parameters

array $vars An associative array with variables
boolean $merge If True, the array will be merged instead of overwritten

in JRouter at line 246
mixed getVar(string $key)

Get a router variable

Parameters

string $key The name of the variable

Return Value

mixed Value of the variable

in JRouter at line 262
array getVars()

Get the router variable array

Return Value

array An associative array of router variables

in JRouter at line 276
attachBuildRule(string $callback)

Attach a build rule

Parameters

string $callback callback The function to be called

in JRouter at line 290
attachParseRule(string $callback)

Attach a parse rule

Parameters

string $callback The function to be called.