Class Tools (namespace Nette)


Tools library.


Author: David Grudl
Copyright: Copyright (c) 2004, 2009 David Grudl
Located: in /Tools.php (line 29)
Public Method Summary
Tools
Static class - cannot be instantiated.
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 38

day in seconds
int HOUR 3600

line 35

hour in seconds
int MINUTE 60

line 32

minute in seconds
int MONTH 2629800

line 44

average month in seconds
int WEEK 604800

line 41

week in seconds
int YEAR 31557600

line 47

average year in seconds

Method Details

line 54

__construct

public Tools __construct ()

Static class - cannot be instantiated.

Output
Tools  

line 143

catchError

public static bool catchError (string &$message)

Returns catched error/warning message.

Input
string &$message catched message
Output
bool  

line 81

defaultize

public static void defaultize (mixed &$var, mixed $default)

Initializes variable with $default value.

Input
mixed &$var variable
mixed $default default value
Output
void  

line 94

glob

public static array glob (string $pattern, [int $flags = 0])

Recursive glob(). Finds pathnames matching a pattern.

Input
string $pattern
int $flags
Output
array  

line 66

iniFlag

public static bool iniFlag (string $var)

Gets the boolean value of a configuration option.

Input
string $var configuration option name
Output
bool  

line 129

tryError

public static void tryError ([$level = E_ALL])

Starts catching potential errors/warnings.

Input
$level
Output
void