Method |
Description |
|
arrayFlatten ( array $array, boolean $preserveKeys = false ) : array |
Force-flattens an array. |
|
arrayShiftKeys ( array &$array ) : string |
Similar to array_shift but on the keys of the array
like array_shift() only for keys and not values |
|
autoPrefixUrl ( string $url, string | null $prefix = null ) : string |
Add protocol prefix if necessary (and possible) |
|
calcElapsedTime ( integer $start, integer $end, integer $precision = 8 ) : float |
Returns microtime as float value
(to be subtracted right away) |
|
cleanUrl ( string $url, boolean $headerRedirect = false ) : string |
Remove unnessary stuff + add http:// for external urls
TODO: protocol to lower! |
|
countDim ( array $array, boolean $all = false, integer $count ) : integer |
Counts the dimensions of an array. If $all is set to false (which is the default) it will
only consider the dimension of the first element in the array. |
|
deep ( callable $function, mixed $value ) : array | string |
Main deep method |
|
expandList ( array $data, string $separator = '.', string | null $undefinedKey = null ) : array |
Expands the values of an array of strings into a deep array. |
|
fileExists ( string $file, string $pattern = '~^https?://~i' ) : boolean |
A more robust wrapper around for file_exists() which easily
fails to return true for existent remote files. |
|
flattenList ( array $data, string $separator = '.' ) : array |
Flattens a deep array into an array of strings. |
|
getClientIp ( boolean $safe = true ) : string |
Get the current IP address. |
|
getHeaderFromUrl ( string $url ) : mixed |
Parse headers from a specific URL content. |
|
getReferer ( boolean $full = false ) : string |
Get the current referrer if available. |
|
inArray ( mixed $needle, array $haystack ) : boolean |
Clean implementation of inArray to avoid false positives. |
|
isValidSaveAll ( array $array ) : boolean |
On non-transaction db connections it will return a deep array of bools instead of bool. |
|
logicalAnd ( array $array ) : boolean |
Returns true only if all values are true. |
|
logicalOr ( array $array ) : boolean |
Returns true if at least one value is true. |
|
microtime ( integer $precision = 8 ) : float |
Returns microtime as float value
(to be subtracted right away) |
|
notEmpty ( mixed $value ) : boolean |
More sane !empty() method to not false positive '0' (0 as string) as empty. |
|
pregMatch ( string $pattern, string $subject, integer | null $flags = null, integer | null $offset = null ) : array |
Multibyte analogue of preg_match() function. Only that this returns the result. |
|
pregMatchAll ( string $pattern, string $subject, integer $flags = PREG_SET_ORDER, integer | null $offset = null ) : array |
Multibyte analogue of preg_match_all() function. Only that this returns the result. |
|
prettyJson ( string $json, string $indString = " " ) : string |
Returns pretty JSON |
|
returnElapsedTime ( integer $precision = 8, boolean $restartClock = false ) : float |
|
|
specialcharsDeep ( mixed $value ) : array | string |
Applies h() recursively |
|
startClock ( ) : void |
|
|
strSplit ( string $str, integer $length = 1 ) : array |
Multibyte analogue of str_split() function. |
|
tokenize ( string $data, string $separator = ',', array $options = [] ) : array |
Tokenizes a string using $separator. |
|
trimDeep ( mixed $value ) : array | string |
Trim recursively |
|
typeCast ( mixed $value, string $type ) : mixed |
Convenience function for automatic casting in form methods etc. |
|
urlExists ( string $url ) : boolean |
file_exists() does not always work with URLs. |
|