Utils
class Utils (View source)
Methods
Magic method as an alias to is_a($object, $type)
Takes an array of values and ouputs them as a string between brackets and separated by a pipe.
Simple test to see if array is multi-dimensional.
Simple test to see if array values are of specified type.
Tests input for valid int or percent
Test if a number is between two other numbers.
Checks if variable is a non-empty string
Checks if variable is a non-empty string within an array of values
Details
at line 13
static
bool
__callStatic(
string $function,
object $configObject)
Magic method as an alias to is_a($object, $type)
at line 38
static
string
arrayToPipedString(
array $defaultValues)
Takes an array of values and ouputs them as a string between brackets and separated by a pipe.
at line 63
static
bool
arrayIsMulti(
array $array)
Simple test to see if array is multi-dimensional.
at line 85
static
bool
arrayValuesCheck(
array $array,
string $type,
string $className = '')
Simple test to see if array values are of specified type.
at line 134
static
bool
isIntOrPercent(
mixed $val)
Tests input for valid int or percent
Valid int = 5 or 12 Valid percent = 32% or 100%
at line 173
static
bool
between(
mixed $lower,
mixed $test,
mixed $upper,
bool $includeLimits = true)
Test if a number is between two other numbers.
Pass in the number to test, the lower limit and upper limit. Defaults to including the limits with <= & >=, set to false to exclude the limits with < & >
at line 197
static
bool
nonEmptyString(
string $var)
Checks if variable is a non-empty string
at line 214
static
bool
nonEmptyStringInArray(
string $var,
array $arr)
Checks if variable is a non-empty string within an array of values