PHP Class Pommo_Helper, poMMo

..);
显示文件 Open project: soonick/poMMo Class Usage Examples

Public Methods

Method Description
arrayIntersect ( &$a1, &$a2 ) returns an array containing all the values of array1 which have matching keys that are present in a2
isAjax ( ) returns true if the page has been requested via a browser XMLHTTPRequest (AJAX call)
isDupe ( &$in, $includeUnsubscribed = false ) returns an array of duplicate found emails. FALSE if no dupes were found.
isEmail ( $_address ) returns email legitimacy (bool)
isEmailS ( $value )
makeCode ( $length = false ) returns code (str)
makePassword ( )
parseConfig ( $file ) Parse a config file, return an array containing key: value
slashStrip ( $input ) deeply strips slashes added by magic quotes. Generally used on $_POST & $_GET.
timeFromStr ( $str ) piggy backs on adodb's excellent time library -- supporting a wide range of dates (100AD +)
timeGetFormat ( ) Returns the current dateformat as a string
timeToStr ( $int ) Function will allow overidding of default date display format (MM/DD/YY vs. DD/MM/YY vs. YYYY/MM/DD etc.)
trimArray ( &$a ) trims an array of whitespace
trimValue ( &$value )

Method Details

arrayIntersect() static public method

returns an array containing all the values of array1 which have matching keys that are present in a2
static public arrayIntersect ( &$a1, &$a2 )

isAjax() public method

returns true if the page has been requested via a browser XMLHTTPRequest (AJAX call)
public isAjax ( )

isDupe() public static method

returns an array of duplicate found emails. FALSE if no dupes were found.
public static isDupe ( &$in, $includeUnsubscribed = false )

isEmail() public static method

returns email legitimacy (bool)
public static isEmail ( $_address )

isEmailS() public method

public isEmailS ( $value )

makeCode() static public method

returns code (str)
static public makeCode ( $length = false )

makePassword() public method

public makePassword ( )

parseConfig() static public method

Grammar of config file is; [key] = "value" or [key] = i am a value If parser comes across a trimmed line not beginning with [, the line will be ignored. this flexible grammar allows for commets and user error (non homogenous syntax)
static public parseConfig ( $file )

slashStrip() public method

deeply strips slashes added by magic quotes. Generally used on $_POST & $_GET.
public slashStrip ( $input )

timeFromStr() public method

piggy backs on adodb's excellent time library -- supporting a wide range of dates (100AD +)
public timeFromStr ( $str )

timeGetFormat() public method

Returns the current dateformat as a string
public timeGetFormat ( )

timeToStr() public method

Function will allow overidding of default date display format (MM/DD/YY vs. DD/MM/YY vs. YYYY/MM/DD etc.)
public timeToStr ( $int )

trimArray() public method

trims an array of whitespace
public trimArray ( &$a )

trimValue() public method

public trimValue ( &$value )