Class Tools (namespace Nette)
Tools library.
| Public Method Summary | |
|---|---|
| Tools |
__construct
()
Static class - cannot be instantiated.
|
| static mixed |
arrayGet
($arr, scalar $key, [mixed $default =
NULL])
Returns array item or $default if item is not set.
|
| static array |
arrayMergeTree
(array $arr1, array $arr2)
Recursively appends elements of remaining keys from the second array to the first.
|
| static bool |
catchError
(string &$message)
Returns catched error/warning message.
|
| static void |
defaultize
(mixed &$var, mixed $default)
Initializes variable with $default value.
|
| static array |
glob
(string $pattern, [int $flags =
0])
Recursive glob(). Finds pathnames matching a pattern.
|
| static bool |
iniFlag
(string $var)
Gets the boolean value of a configuration option.
|
| static void |
tryError
([$level =
E_ALL])
Starts catching potential errors/warnings.
|
| Constant Summary | |||
|---|---|---|---|
| int | DAY |
86400 |
line 36 day in seconds |
| int | HOUR |
3600 |
line 33 hour in seconds |
| int | YEAR |
31557600 |
line 39 year in seconds |
| Method Details | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
line 46 __constructpublic Tools __construct () Static class - cannot be instantiated.
|
||||||||||||||||||
|
line 89 arrayGetpublic static mixed arrayGet ($arr, scalar $key, [mixed $default = Returns array item or $default if item is not set. Example: $val = arrayGet($arr, 'i', 123);
|
||||||||||||||||||
|
line 103 arrayMergeTreepublic static array arrayMergeTree (array $arr1, array $arr2) Recursively appends elements of remaining keys from the second array to the first.
|
||||||||||||||||||
|
line 171 catchErrorpublic static bool catchError (string &$message) Returns catched error/warning message.
|
||||||||||||||||||
|
line 73 defaultizepublic static void defaultize (mixed &$var, mixed $default) Initializes variable with $default value.
|
||||||||||||||||||
|
line 122 globpublic static array glob (string $pattern, [int $flags = Recursive glob(). Finds pathnames matching a pattern.
|
||||||||||||||||||
|
line 58 iniFlagpublic static bool iniFlag (string $var) Gets the boolean value of a configuration option.
|
||||||||||||||||||
|
line 157 tryErrorpublic static void tryError ([$level = Starts catching potential errors/warnings.
|
||||||||||||||||||
