\BorisColoredInspector

Identifies data types in data structures and syntax highlights them.

Summary

Methods
Properties
Constants
__construct()
inspect()
objectVars()
_dump()
_buildAst()
_astToString()
$TERM_COLORS
No constants found
No protected methods found
No protected properties found
N/A
_dumpNull()
_dumpString()
_dumpBoolean()
_dumpInteger()
_dumpFloat()
_dumpArray()
_dumpObject()
_dumpStructure()
_defaultColorMap()
_colorize()
_isSeen()
$_fallback
$_colorMap
N/A

Properties

$TERM_COLORS

$TERM_COLORS : 

Type

$_fallback

$_fallback : 

Type

$_colorMap

$_colorMap : 

Type

Methods

__construct()

__construct(array  $colorMap = null) 

Initialize a new ColoredInspector, using $colorMap.

The colors should be an associative array with the keys:

  • 'integer'
  • 'float'
  • 'keyword'
  • 'string'
  • 'boolean'
  • 'default'

And the values, one of the following colors:

  • 'none'
  • 'black'
  • 'white'
  • 'dark_grey'
  • 'light_grey'
  • 'dark_red'
  • 'light_red'
  • 'dark_green'
  • 'light_green'
  • 'dark_yellow'
  • 'light_yellow'
  • 'dark_blue'
  • 'light_blue'
  • 'dark_purple'
  • 'light_purple'
  • 'dark_cyan'
  • 'light_cyan'

An empty $colorMap array effectively means 'none' for all types.

Parameters

array $colorMap

inspect()

inspect(mixed  $variable) : string

Return a debug-friendly string representation of $variable.

Parameters

mixed $variable

Returns

string

objectVars()

objectVars(object  $value) : array

Returns an associative array of an object's properties.

This method is public so that subclasses may override it.

Parameters

object $value

Returns

array

_dump()

_dump(  $value) 

Parameters

$value

_buildAst()

_buildAst(  $type,   $value,   $seen = array()) 

Parameters

$type
$value
$seen

_astToString()

_astToString(  $node,   $indent) 

Parameters

$node
$indent

_dumpNull()

_dumpNull(  $value) 

Parameters

$value

_dumpString()

_dumpString(  $value) 

Parameters

$value

_dumpBoolean()

_dumpBoolean(  $value) 

Parameters

$value

_dumpInteger()

_dumpInteger(  $value) 

Parameters

$value

_dumpFloat()

_dumpFloat(  $value) 

Parameters

$value

_dumpArray()

_dumpArray(  $value) 

Parameters

$value

_dumpObject()

_dumpObject(  $value) 

Parameters

$value

_dumpStructure()

_dumpStructure(  $type,   $value) 

Parameters

$type
$value

_defaultColorMap()

_defaultColorMap() 

_colorize()

_colorize(  $type,   $value) 

Parameters

$type
$value

_isSeen()

_isSeen(  $value,   $seen) 

Parameters

$value
$seen