Class CoverageUtils

Method Summary
 static void addItemAsArray ( &$array,  $key, unknown_type $item, unknown_type $array)
 static void isPackageClassAvailable ( $includeFile,  $class)
 static first issetOr ( &$val, [unknown_type $default = null], unknown_type $val)
 static void mkdir ( $dir)
 static unknown parseArguments (unknown_type $argv, [supportMutliValue $mutliValueMode = False])
 static void requireSqlite ()
static addItemAsArray (line 91)

Adds a value as an array of one, or appends to an existing array elements

void addItemAsArray ( &$array,  $key, unknown_type $item, unknown_type $array)
  • unknown_type $array
  • unknown_type $item
  • &$array
  • $key
static isPackageClassAvailable (line 29)
void isPackageClassAvailable ( $includeFile,  $class)
  • $includeFile
  • $class
static issetOr (line 109)

isset function with default value

Example: $z = CoverageUtils::issetOr($array[$key], 'no value given')

  • return: value unless value is not set then returns 2nd arg or null if no 2nd arg
  • access: public
first issetOr ( &$val, [unknown_type $default = null], unknown_type $val)
  • unknown_type $val
  • unknown_type $default
  • &$val
static mkdir (line 12)
void mkdir ( $dir)
  • $dir
static parseArguments (line 61)

Parses simple parameters from CLI.

Puts trailing parameters into string array in 'extraArguments'

Example: $args = CoverageUtil::parseArguments($_SERVER['argv']); if ($args['verbose']) echo "Verbose Mode On\n"; $files = $args['extraArguments'];

Example CLI: --foo=blah -x -h some trailing arguments

if multiValueMode is true Example CLI: --include=a --include=b --exclude=c Then $args = CoverageUtil::parseArguments($_SERVER['argv']); $args['include[]'] will equal array('a', 'b') $args['exclude[]'] will equal array('c') $args['exclude'] will equal c $args['include'] will equal b NOTE: only keeps last value

  • access: public
unknown parseArguments (unknown_type $argv, [supportMutliValue $mutliValueMode = False])
  • unknown_type $argv
  • supportMutliValue $mutliValueMode: - will store 2nd copy of value in an array with key "foo[]"
static requireSqlite (line 22)
void requireSqlite ()

Documentation generated on Sun, 31 Oct 2010 16:31:09 -0500 by phpDocumentor 1.4.3