Utils
Namespace: App\Shared\Services\Utils
Method | Description | Type | Parameters | Return |
---|---|---|---|---|
parseStr | Parses a string into variables to be stored in an array Uses {link http://www.php.net/parse_str} throws Exception throws ReflectionException |
public static |
string $string The string to be parsed array $array Variables will be stored in this array |
|
ifNull | Checks if a variable is null If not null, check if integer or string |
public static |
int|string $var Variable to check | string int null Returns null if empty otherwise a string or an integer |
parseArgs | Merge user defined arguments into defaults array throws Exception throws ReflectionException |
public static |
array|string|object $args Value to merge with $defaults array|string $defaults Optional Array that serves as the defaults Default empty |
array Merged user defined values with defaults |
getPathInfo | public static |
|||
isAdmin | Whether the current request is for an administrative interface eg admin |
public static |
bool True if an admin screen, otherwise false | |
isLogin | Whether the current request is for a login interface eg login |
public static |
bool True if login screen, otherwise false |