library/Dot/Kernel.php

Properties

Description

DotBoost Technologies Inc.

DotKernel Application Framework


Classes

Dot_Kernel

Properties

 
 
No 
No 

Description

Bunch of miscelaneous functions, used in all DotKernel Applications

Methods

checkUserToken, gallop, generateUserToken, getBrowserIcon, getDevice, getOsIcon, getUserIp, initialize, pageNotFound, timeFormat, validIp,

checkUserToken(   $type = admin, ) : void

Description

Check if a user's token is set and is correct

Arguments

Name Type Description Default
$type n/a admin

Return value

Type Description
void

Tags

Name Description
access public
static

gallop( ) : n/a

Return value

Type Description
n/a n/a

generateUserToken( string   $password, ) : array

Description

Generate a token for a user

Arguments

Name Type Description Default
$password string - the users's password or password has

Return value

Type Description
array

Tags

Name Description
access public
static

getBrowserIcon(   $agent,   $return = icon, ) : string

Description

Return the name of the browser icon based on User Agent

Arguments

Name Type Description Default
$agent n/a
$return n/a icon

Return value

Type Description
string

Tags

Name Description
access public
static

getDevice( ) : Zend_Http_UserAgent_...

Description

Get HTTP UserAgent Device.

Device may be Bot, Checker, Console, Desktop, Email, Feed, Mobile, Offline, Probe, Spam, Text, Validator If device is mobile, return will be Zend_Http_UserAgent_Mobile


Return value

Type Description
Zend_Http_UserAgent_...

getOsIcon(   $agent, ) : array

Description

Return the name of the OS icon based on User Agent

Arguments

Name Type Description Default
$agent n/a

Return value

Type Description
array

Tags

Name Description
access public
static

getUserIp( ) : string

Description

Return the user Ip, even if it is behind a proxy

Return value

Type Description
string

Tags

Name Description
access public
static

initialize(   $startTime, ) : n/a

Description

Initialize the global variables

Arguments

Name Type Description Default
$startTime n/a

Return value

Type Description
n/a n/a

pageNotFound( string   $who, ) : bool

Description

End the execution of the application, by sending an 404 header and redirecting to home page

Arguments

Name Type Description Default
$who string [optional]

Return value

Type Description
bool

Tags

Name Description
access public

timeFormat( string   $date, string   $format = short, ) : string

Description

Return date formatted fancy

Arguments

Name Type Description Default
$date string
$format string - 'short', 'long' short

Return value

Type Description
string

Tags

Name Description
access public
static

validIp( string   $ip, ) : mixt

Description

Check if IP is valid. Return FALSE | 'private' | 'public' FALSE - $ip is not a valid IP address private - $ip is a private network IP address, loopback address or an IPv6 IP address public - $ip is a public network IP address

Arguments

Name Type Description Default
$ip string

Return value

Type Description
mixt [FALSE | 'private' | 'public']

Tags

Name Description
access public
static

Constants

string  VERSION = 1.5.0 dev

Constant Dot Kernel version identification


Documentation was generated by DocBlox.

Packages