Administrator Guide

720 | Reference Dell Networking W-ClearPass Guest 6.6 | User Guide
Formats a Boolean value as a string. If 3 function arguments are supplied, the 2nd and 3rd arguments are the
values to return for false and true, respectively. Otherwise, the $options parameter specifies how to do the
conversion:
l If an integer 0 or 1, the string values 0 and 1 are returned.
l If a string containing a | character, the string is split at this separator and used as the values for false and
true respectively.
l If an array, the 0 and 1 index values are used for false and true values.
l Otherwise, the string values true and “false are returned.
NwaByteFormat
NwaByteFormat($bytes, $unknown = null)
Formats a non-negative size in bytes as a human readable number (bytes, KB, MB, GB, etc.) Assumes that 1 KB
= 1024 bytes, 1 MB = 1024 KB, etc. If a negative value is supplied, returns the $unknown string. If a non-
numeric value is supplied, that value is returned directly.
NwaByteFormatBase10
NwaByteFormatBase10($bytes, $unknown = null)
Formats a non-negative size in bytes as a human readable number (bytes, KB, MB, GB, etc.) Assumes base 10
rules in measurement; that is, 1 KB = 1000 bytes, 1 MB = 1000 KB, etc. If a negative value is supplied, returns
the $unknown string. If a non-numeric value is supplied, that value is returned directly.
NwaComplexPassword
NwaComplexPassword($len = 8)
Generates complex passwords of at least $len characters in length, where $len must be at least 4. A complex
password includes at least 1 each of a lower case character, upper case character, digit, and punctuation
(symbol).
NwaCsvCache
NwaCsvCache($csv_file, $use_cache = true, $options = null)
Loads and parses the contents of a CSV file, using a built-in cache. The cache may be cleaned for a specific file
by setting $use_cache to false. The cache may be cleaned for ALL files by setting $csv_file to the empty
string and $use_cache to false.
CSV parsing options (see "NwaParseCsv" on page 722) may be specified in $options. Additionally, a 2-
argument form of this function may be used by passing an array of $options as the second argument; in this
case, $use_cache is assumed to be true. This function returns false if the file does not exist; otherwise,
returns an array of arrays containing each of the parsed records from the file.
NwaDigitsPassword($len)
NwaDigitsPassword($len)
Generates digit-only passwords of at least $len characters in length.
NwaDynamicLoad
NwaDynamicLoad($func)