\TriTan\CommonUri

Summary

Methods
Properties
Constants
__construct()
redirect()
shorten()
getPathInfo()
isAdmin()
isLogin()
$hook
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$hook

$hook : 

Type

Methods

redirect()

redirect(string  $location, integer  $status = 302) : boolean

Redirects to another page.

Uses ttcms_redirect and ttcms_redirect_status filter hooks.

Parameters

string $location

The path to redirect to

integer $status

Status code to use

Returns

boolean —

False if $location is not set

shorten()

shorten(string  $url, integer  $length = 80) : string

Url shortening function.

Parameters

string $url

URL

integer $length

Characters to check against.

Returns

string

getPathInfo()

getPathInfo(  $relative) 

Parameters

$relative

isAdmin()

isAdmin() : boolean

Whether the current request is for an administrative interface.

e.g. /admin/

Returns

boolean —

True if an admin screen, otherwise false.

isLogin()

isLogin() : boolean

Whether the current request is for a login interface.

e.g. /login/

Returns

boolean —

True if login screen, otherwise false.