\FF

FuzzFree main helper class

A collection of useful static methods

Summary

Methods
Properties
Constants
request()
varCleanFromInput()
varCleanFromInputKeepLines()
varPrepForDisplay()
e()
validateDatetime()
q()
getRealIpAddress()
dd()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

request()

request(  $hash, mixed  $var,   $default = null) 

Request a var (GET, POST, REQUEST, COOKIE)

@param string $hash

Parameters

$hash
mixed $var

@param mixed $default @return mixed cleaned

$default

varCleanFromInput()

varCleanFromInput(  $var) : mixed

Clean a variable - generic

@param mixed $var string or array

Parameters

$var

Returns

mixed —

cleaned

varCleanFromInputKeepLines()

varCleanFromInputKeepLines(string  $var) 

Clean a variable but keep lines

@see varCleanFromInput

Parameters

string $var

@return string cleaned

varPrepForDisplay()

varPrepForDisplay(  $var) : mixed

Prepare a variable for output

@param mixed $var string or array

Parameters

$var

Returns

mixed —

cleaned ready for display

e()

e(  $var) 

Alias for varPrepForDisplay

@param mixed $var string or array

Parameters

$var

validateDatetime()

validateDatetime(  $var,   $format = 'Y-m-d H:i:s') : boolean

Validate date timestamp

@param string $var

Parameters

$var
$format

Returns

boolean

q()

q(  $var, string  $con = 'mysql') 

DB escape - quick shortcut for laravel

@param mixed $var

Parameters

$var
string $con

connection (see config/database) @return \PDO::quote()

getRealIpAddress()

getRealIpAddress() : string

Get real ip address even if server or client is behind proxies/lb etc.

Borrowed from Oscommerce

Returns

string —

Found ip v4 address

dd()

dd(  $var,   $exit = true) 

Dump data

@param string

Parameters

$var
$exit