Class SimpleDumper

Description

Displays variables as text and does diffs.

Located in /dumper.php (line 20)


	
			
Method Summary
 string clipString (string $value, integer $size, [integer $position = 0])
 string describeArrayDifference (array $first, mixed $second, boolean $identical)
 string describeBooleanDifference (boolean $first, mixed $second, boolean $identical)
 string describeDifference (mixed $first, mixed $second, [boolean $identical = false])
 string describeFloatDifference (float $first, mixed $second, boolean $identical)
 string describeGenericDifference (null $first, mixed $second)
 string describeIntegerDifference (integer $first, mixed $second, boolean $identical)
 string describeNullDifference (null $first, mixed $second, boolean $identical)
 string describeObjectDifference (object $first, mixed $second, boolean $identical)
 string describeResourceDifference (resource $first, mixed $second, boolean $identical)
 string describeStringDifference (string $first, mixed $second, boolean $identical)
 string describeValue (mixed $value)
 string dump (mixed $variable)
 array getMembers (object $object)
 string getType (mixed $value)
 boolean isMatchingKeys (array $first, array $second, boolean $identical)
 boolean isTypeMatch (mixed $first, mixed $second)
 integer stringDiffersAt (string $first, string $second)
 string unmangle (string $mangled)
Methods
clipString (line 118)

Clips a string to a maximum length.

  • return: Shortened version.
  • access: public
string clipString (string $value, integer $size, [integer $position = 0])
  • string $value: String to truncate.
  • integer $size: Minimum string size to show.
  • integer $position: Centre of string section.
describeArrayDifference (line 241)

Creates a human readable description of the difference between two arrays.

  • return: Human readable description.
  • access: protected
string describeArrayDifference (array $first, mixed $second, boolean $identical)
  • array $first: First array.
  • mixed $second: Array to compare with.
  • boolean $identical: If true then type anomolies count.
describeBooleanDifference (line 169)

Creates a human readable description of the difference between a boolean and another variable.

  • return: Human readable description.
  • access: protected
string describeBooleanDifference (boolean $first, mixed $second, boolean $identical)
  • boolean $first: First boolean.
  • mixed $second: Boolean to compare with.
  • boolean $identical: If true then type anomolies count.
describeDifference (line 84)

Creates a human readable description of the difference between two variables. Uses a dynamic call.

  • return: Description of difference.
  • access: public
string describeDifference (mixed $first, mixed $second, [boolean $identical = false])
  • mixed $first: First variable.
  • mixed $second: Value to compare with.
  • boolean $identical: If true then type anomolies count.
describeFloatDifference (line 222)

Creates a human readable description of the difference between two floating point numbers.

  • return: Human readable description.
  • access: protected
string describeFloatDifference (float $first, mixed $second, boolean $identical)
  • float $first: First float.
  • mixed $second: Float to compare with.
  • boolean $identical: If true then type anomolies count.
describeGenericDifference (line 141)

Creates a human readable description of the difference between two variables. The minimal version.

  • return: Human readable description.
  • access: protected
string describeGenericDifference (null $first, mixed $second)
  • null $first: First value.
  • mixed $second: Value to compare with.
describeIntegerDifference (line 203)

Creates a human readable description of the difference between an integer and another variable.

  • return: Human readable description.
  • access: protected
string describeIntegerDifference (integer $first, mixed $second, boolean $identical)
  • integer $first: First number.
  • mixed $second: Number to compare with.
  • boolean $identical: If true then type anomolies count.
describeNullDifference (line 156)

Creates a human readable description of the difference between a null and another variable.

  • return: Human readable description.
  • access: protected
string describeNullDifference (null $first, mixed $second, boolean $identical)
  • null $first: First null.
  • mixed $second: Null to compare with.
  • boolean $identical: If true then type anomolies count.
describeObjectDifference (line 307)

Creates a human readable description of the difference between two objects.

  • return: Human readable description.
  • access: protected
string describeObjectDifference (object $first, mixed $second, boolean $identical)
  • object $first: First object.
  • mixed $second: Object to compare with.
  • boolean $identical: If true then type anomolies count.
describeResourceDifference (line 295)

Creates a human readable description of the difference between a resource and another variable.

  • return: Human readable description.
  • access: protected
string describeResourceDifference (resource $first, mixed $second, boolean $identical)
  • resource $first: First resource.
  • mixed $second: Resource to compare with.
  • boolean $identical: If true then type anomolies count.
describeStringDifference (line 182)

Creates a human readable description of the difference between a string and another variable.

  • return: Human readable description.
  • access: protected
string describeStringDifference (string $first, mixed $second, boolean $identical)
  • string $first: First string.
  • mixed $second: String to compare with.
  • boolean $identical: If true then type anomolies count.
describeValue (line 28)

Renders a variable in a shorter form than print_r().

  • return: Human readable string form.
  • access: public
string describeValue (mixed $value)
  • mixed $value: Variable to render as a string.
dump (line 399)

Sends a formatted dump of a variable to a string.

  • return: Output from print_r().
  • access: public
string dump (mixed $variable)
  • mixed $variable: Variable to display.
getMembers (line 324)

Get all members of an object including private and protected ones.

A safer form of casting to an array.

  • return: Names and values in the object.
  • access: protected
array getMembers (object $object)
  • object $object: Object to list members of, including private ones.
getType (line 53)

Gets the string representation of a type.

  • return: Type.
  • access: public
string getType (mixed $value)
  • mixed $value: Variable to check against.
isMatchingKeys (line 275)

Compares two arrays to see if their key lists match.

For an identical match, the ordering and types of the keys is significant.

  • return: True if matching.
  • access: protected
boolean isMatchingKeys (array $first, array $second, boolean $identical)
  • array $first: First array.
  • array $second: Array to compare with.
  • boolean $identical: If true then type anomolies count.
isTypeMatch (line 106)

Tests to see if types match.

  • return: True if matches.
  • access: protected
boolean isTypeMatch (mixed $first, mixed $second)
  • mixed $first: First variable.
  • mixed $second: Value to compare with.
stringDiffersAt (line 375)

Find the first character position that differs in two strings by binary chop.

  • return: Position of first differing character.
  • access: protected
integer stringDiffersAt (string $first, string $second)
  • string $first: First string.
  • string $second: String to compare with.
unmangle (line 361)

Removes crud from property name after it's been converted to an array.

  • return: Cleaned up name.
string unmangle (string $mangled)
  • string $mangled: Name from array cast.

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