A convenience class to convert property values to specific types.
Located in /helpers/LoggerOptionConverter.php (line 29)
String values which are converted to boolean FALSE.
Note that an empty string must convert to false, because parse_ini_file() which is used for parsing configuration converts the value _false_ to an empty string.
String values which are converted to boolean TRUE.
Find the value corresponding to $key in $props. Then perform variable substitution on the found value.
Read a predefined var.
It returns a value referenced by $key using this search criteria:
Perform variable substitution in string $val from the values of keys found with the getSystemProperty() method.
The variable substitution delimeters are ${ and }.
For example, if the "MY_CONSTANT" contains "value", then the call
If no value could be found for the specified key, then the $props parameter is searched, if the value could not be found there, then substitution defaults to the empty string.
For example, if getSystemProperty() cannot find any value for the key "inexistentKey", then the call
A warn is thrown if $val contains a start delimeter "${" which is not balanced by a stop delimeter "}" and an empty string is returned.
If $value is true, then true is returned. If $value is false, then true is returned. Otherwise, $default is returned.
Case of value is unimportant.
Converts $value to boolean, or throws an exception if not possible.
Converts a value to a valid file size (integer).
Supports 'KB', 'MB' and 'GB' suffixes, where KB = 1024 B etc.
The final value will be rounded to the nearest integer.
Examples:
Converts $value to integer, or throws an exception if not possible.
Floats cannot be converted to integer.
Converts a standard or custom priority level to a Level object.
If $value is of form "level#full_file_classname", where full_file_classname means the class filename with path but without php extension, then the specified class' toLevel() method is called to process the specified level string; if no '#' character is present, then the default LoggerLevel class is used to process the level value.
As a special case, if the $value parameter is equal to the string "NULL", then the value null will be returned.
If any error occurs while converting the value to a level, the $defaultValue parameter, which may be null, is returned.
Case of $value is insignificant for the level level, but is significant for the class name part, if present.
Converts the value to a level. Throws an exception if not possible.
Converts $value to integer, or throws an exception if not possible.
Floats cannot be converted to integer.
Converts a value to string, or throws an exception if not possible.
Objects can be converted to string if they implement the magic __toString() method.
Documentation generated on Sat, 18 Feb 2012 22:32:26 +0000 by phpDocumentor 1.4.3