Exponent v2.7.2

expRouter
in package

This is the class expRouter

Tags
subpackage

Subsystems

Table of Contents

$current_url  : mixed
$params  : mixed
$url_parts  : mixed
$url_type  : string
Type of url either 'base' (default page), 'page', 'action', or 'malformed'
$maps  : mixed
$sefPath  : mixed
$url_style  : string
Style of url either 'sef' or 'query'
__construct()  : mixed
buildCurrentUrl()  : mixed
buildUrlByPageId()  : mixed
cleanLink()  : string
remove trailing slash
convertPartsToParams()  : array<string|int, mixed>|string
Convert url_parts() or $_REQUEST to $params
convertToOldSchoolUrl()  : mixed
decode()  : mixed
encode()  : mixed
exportAsPDFLink()  : mixed
getPageByName()  : null|object|void
Attempt to locate a page by name or id
getRouterMaps()  : mixed
getSection()  : mixed
getSectionObj()  : mixed
getSefUrlByPageId()  : mixed
getTrackingId()  : mixed
isMappedURL()  : mixed
figure out if this action is mapped via the mapping file (router_maps.php)
makeLink()  : string
Will build url to a module/page/etc (determined by what is passed to the $params array).
plainPath()  : string
Returns a cleaner canonical link sans 'src' param
printerFriendlyLink()  : mixed
routeActionRequest()  : bool
Check and set up for an action request
routePageRequest()  : bool
Set up for page request, but check store category/product also
routeRequest()  : mixed
splitURL()  : mixed
Assign url_type & url_style
updateHistory()  : mixed
buildSEFPath()  : mixed
Get the SEF URL from the server if we got an old school url, it will only contain the 'index.php'

Properties

$url_type

Type of url either 'base' (default page), 'page', 'action', or 'malformed'

public string $url_type = ''

$url_style

Style of url either 'sef' or 'query'

private string $url_style = ''

Methods

__construct()

public __construct() : mixed
Return values
mixed

buildCurrentUrl()

public buildCurrentUrl() : mixed
Return values
mixed

buildUrlByPageId()

public buildUrlByPageId([mixed $id = null ]) : mixed
Parameters
$id : mixed = null
Return values
mixed

remove trailing slash

public static cleanLink( $fulllink) : string
Parameters
$fulllink :
Return values
string

convertPartsToParams()

Convert url_parts() or $_REQUEST to $params

public convertPartsToParams() : array<string|int, mixed>|string
Return values
array<string|int, mixed>|string

convertToOldSchoolUrl()

public convertToOldSchoolUrl() : mixed
Return values
mixed

decode()

public static decode(mixed $url) : mixed
Parameters
$url : mixed
Return values
mixed

encode()

public static encode(mixed $url) : mixed
Parameters
$url : mixed
Return values
mixed
public exportAsPDFLink([mixed $link_text = "Export as PDF" ][, mixed $class = null ][, mixed $width = 800 ][, mixed $height = 600 ][, mixed $view = '' ][, mixed $orientation = false ][, mixed $limit = '' ][, mixed $title_text = "Export as PDF" ]) : mixed
Parameters
$link_text : mixed = "Export as PDF"
$class : mixed = null
$width : mixed = 800
$height : mixed = 600
$view : mixed = ''
$orientation : mixed = false
$limit : mixed = ''
$title_text : mixed = "Export as PDF"
Return values
mixed

getPageByName()

Attempt to locate a page by name or id

public getPageByName( $url_name) : null|object|void
Parameters
$url_name :
Return values
null|object|void

getRouterMaps()

public getRouterMaps() : mixed
Return values
mixed

getSection()

public getSection() : mixed
Return values
mixed

getSectionObj()

public getSectionObj(mixed $section) : mixed
Parameters
$section : mixed
Return values
mixed

getSefUrlByPageId()

public getSefUrlByPageId([mixed $id = null ]) : mixed
Parameters
$id : mixed = null
Return values
mixed

getTrackingId()

public getTrackingId() : mixed
Return values
mixed

isMappedURL()

figure out if this action is mapped via the mapping file (router_maps.php)

public isMappedURL() : mixed
Return values
mixed

Will build url to a module/page/etc (determined by what is passed to the $params array).

public makeLink(array<string|int, mixed> $params[, bool $force_old_school = false ][, bool $secure = false ][, bool $no_map = false ]) : string
Parameters
$params : array<string|int, mixed>

The params that are passed will determine what link is make section action sef_name module controller action

$force_old_school : bool = false

Old School as in not SEF.

$secure : bool = false

If you set $secure true but ENABLE_SSL is not turned on in the config this will be forced false

$no_map : bool = false

Ignore router_maps

Return values
string

A url

plainPath()

Returns a cleaner canonical link sans 'src' param

public plainPath() : string
Return values
string
public printerFriendlyLink([mixed $link_text = "Printer Friendly" ][, mixed $class = null ][, mixed $width = 800 ][, mixed $height = 600 ][, mixed $view = '' ][, mixed $title_text = "Printer Friendly" ]) : mixed
Parameters
$link_text : mixed = "Printer Friendly"
$class : mixed = null
$width : mixed = 800
$height : mixed = 600
$view : mixed = ''
$title_text : mixed = "Printer Friendly"
Return values
mixed

routeActionRequest()

Check and set up for an action request

public routeActionRequest() : bool
Return values
bool

routePageRequest()

Set up for page request, but check store category/product also

public routePageRequest() : bool
Tags
throws
ReflectionException
Return values
bool

routeRequest()

public routeRequest() : mixed
Return values
mixed

splitURL()

Assign url_type & url_style

public splitURL() : mixed
Return values
mixed

updateHistory()

public updateHistory([mixed $section = null ]) : mixed
Parameters
$section : mixed = null
Return values
mixed

buildSEFPath()

Get the SEF URL from the server if we got an old school url, it will only contain the 'index.php'

private buildSEFPath() : mixed
Return values
mixed

Search results