Moodle  2.2.1
http://www.collinsharper.com
SimpleDumper Class Reference

Public Member Functions

 describeValue ($value)
 getType ($value)
 describeDifference ($first, $second, $identical=false)
 _isTypeMatch ($first, $second)
 clipString ($value, $size, $position=0)
 _describeGenericDifference ($first, $second)
 _describeNullDifference ($first, $second, $identical)
 _describeBooleanDifference ($first, $second, $identical)
 _describeStringDifference ($first, $second, $identical)
 _describeIntegerDifference ($first, $second, $identical)
 _describeFloatDifference ($first, $second, $identical)
 _describeArrayDifference ($first, $second, $identical)
 _isMatchingKeys ($first, $second, $identical)
 _describeResourceDifference ($first, $second, $identical)
 _describeObjectDifference ($first, $second, $identical)
 _stringDiffersAt ($first, $second)

Static Public Member Functions

 dump ($variable)

Detailed Description

Definition at line 20 of file dumper.php.


Member Function Documentation

_describeArrayDifference ( first,
second,
identical 
)

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

Parameters:
array$firstFirst array.
mixed$secondArray to compare with.
boolean$identicalIf true then type anomolies count.
Returns:
string Human readable description. private

Definition at line 241 of file dumper.php.

Here is the call graph for this function:

Here is the caller graph for this function:

_describeBooleanDifference ( first,
second,
identical 
)

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

Parameters:
boolean$firstFirst boolean.
mixed$secondBoolean to compare with.
boolean$identicalIf true then type anomolies count.
Returns:
string Human readable description. private

Definition at line 169 of file dumper.php.

Here is the call graph for this function:

_describeFloatDifference ( first,
second,
identical 
)

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

Parameters:
float$firstFirst float.
mixed$secondFloat to compare with.
boolean$identicalIf true then type anomolies count.
Returns:
string Human readable description. private

Definition at line 222 of file dumper.php.

Here is the call graph for this function:

_describeGenericDifference ( first,
second 
)

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

Parameters:
null$firstFirst value.
mixed$secondValue to compare with.
Returns:
string Human readable description. private

Definition at line 141 of file dumper.php.

Here is the call graph for this function:

Here is the caller graph for this function:

_describeIntegerDifference ( first,
second,
identical 
)

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

Parameters:
integer$firstFirst number.
mixed$secondNumber to compare with.
boolean$identicalIf true then type anomolies count.
Returns:
string Human readable description. private

Definition at line 203 of file dumper.php.

Here is the call graph for this function:

_describeNullDifference ( first,
second,
identical 
)

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

Parameters:
null$firstFirst null.
mixed$secondNull to compare with.
boolean$identicalIf true then type anomolies count.
Returns:
string Human readable description. private

Definition at line 156 of file dumper.php.

Here is the call graph for this function:

_describeObjectDifference ( first,
second,
identical 
)

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

Parameters:
object$firstFirst object.
mixed$secondObject to compare with.
boolean$identicalIf true then type anomolies count.
Returns:
string Human readable description. private

Definition at line 308 of file dumper.php.

Here is the call graph for this function:

_describeResourceDifference ( first,
second,
identical 
)

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

Parameters:
resource$firstFirst resource.
mixed$secondResource to compare with.
boolean$identicalIf true then type anomolies count.
Returns:
string Human readable description. private

Definition at line 295 of file dumper.php.

Here is the call graph for this function:

_describeStringDifference ( first,
second,
identical 
)

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

Parameters:
string$firstFirst string.
mixed$secondString to compare with.
boolean$identicalIf true then type anomolies count.
Returns:
string Human readable description. private

Definition at line 182 of file dumper.php.

Here is the call graph for this function:

_isMatchingKeys ( first,
second,
identical 
)

Compares two arrays to see if their key lists match. For an identical match, the ordering and types of the keys is significant.

Parameters:
array$firstFirst array.
array$secondArray to compare with.
boolean$identicalIf true then type anomolies count.
Returns:
boolean True if matching. private

Definition at line 275 of file dumper.php.

Here is the caller graph for this function:

_isTypeMatch ( first,
second 
)

Tests to see if types match.

Parameters:
mixed$firstFirst variable.
mixed$secondValue to compare with.
Returns:
boolean True if matches. private

Definition at line 106 of file dumper.php.

Here is the call graph for this function:

Here is the caller graph for this function:

_stringDiffersAt ( first,
second 
)

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

Parameters:
string$firstFirst string.
string$secondString to compare with.
Returns:
integer Position of first differing character. private

Definition at line 327 of file dumper.php.

Here is the caller graph for this function:

clipString ( value,
size,
position = 0 
)

Clips a string to a maximum length.

Parameters:
string$valueString to truncate.
integer$sizeMinimum string size to show.
integer$positionCentre of string section.
Returns:
string Shortened version. public

Definition at line 118 of file dumper.php.

Here is the caller graph for this function:

describeDifference ( first,
second,
identical = false 
)

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

Parameters:
mixed$firstFirst variable.
mixed$secondValue to compare with.
boolean$identicalIf true then type anomolies count.
Returns:
string Description of difference. public

Definition at line 84 of file dumper.php.

Here is the call graph for this function:

Here is the caller graph for this function:

describeValue ( value)

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

Parameters:
mixed$valueVariable to render as a string.
Returns:
string Human readable string form. public

Definition at line 28 of file dumper.php.

Here is the call graph for this function:

Here is the caller graph for this function:

dump ( variable) [static]

Sends a formatted dump of a variable to a string.

Parameters:
mixed$variableVariable to display.
Returns:
string Output from print_r(). public

Definition at line 352 of file dumper.php.

getType ( value)

Gets the string representation of a type.

Parameters:
mixed$valueVariable to check against.
Returns:
string Type. public

Definition at line 53 of file dumper.php.

Here is the caller graph for this function:


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations