Utils
class Utils (View source)
Methods
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 14
                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 32
                static            
    bool
    arrayIsMulti(
    array $array)
    
    Simple test to see if array is multi-dimensional.
        at line 53
                static            
    boolean
    arrayValuesCheck(
    array $array, 
    string $type, 
    string $className = '')
    
    Simple test to see if array values are of specified type.
        at line 101
                static            
    bool
    isIntOrPercent(
    mixed $val)
    
    Tests input for valid int or percent
Valid int = 5 or 12 Valid percent = 32% or 100%
        at line 139
                static            
    bool
    between(
    int|float $lower, 
    int|float $test, 
    int|float $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 162
                static            
    bool
    nonEmptyString(
    string $var)
    
    Checks if variable is a non-empty string
        at line 178
                static            
    bool
    nonEmptyStringInArray(
    string $var, 
    array $arr)
    
    Checks if variable is a non-empty string within an array of values