PHP Class Krumo

This class stores the Krumo API for rendering and displaying the structured information it is reporting
ファイルを表示 Open project: mmucklo/krumo Class Usage Examples

Public Properties

Property Type Description
$expand_all static::$expand_all = 1; krumo($my_array);
$sort

Public Methods

Method Description
backtrace ( ) Prints a debug backtrace
calculate_relative_path ( $file, $returnDir = false ) : string Calculate the relative path of a given absolute URL
cascade ( array $cascade = null ) Set a cascade configuration array.
classes ( ) Prints a list of all currently declared classes.
conf ( ) Prints a list of all your configuration settings.
cookie ( ) Prints a list of all the values from the $_COOKIE array.
defines ( ) Prints a list of all currently declared constants.
disable ( ) : boolean Disable Krumo
dump ( $data, $second = '' ) : boolean Dump information about a variable
enable ( ) : boolean Enable Krumo
env ( ) Prints a list of all the values from the $_ENV array.
extensions ( ) Prints a list of all currently loaded PHP extensions.
functions ( ) Prints a list of all currently declared functions.
get ( ) Prints a list of all the values from the $_GET array.
get_icon ( $name, $title )
get_separator ( ) : string Get the separator to use for separating 'key' / 'value' pairs. Defaults to ' => '
headers ( ) Prints a list of all HTTP request headers.
htmlHeaders ( )
includes ( ) Prints a list of all currently included (or required) files.
ini ( string $ini_file ) : boolean Prints a list of all the values from an INI file.
interfaces ( ) Prints a list of all currently declared interfaces (PHP5 only).
path ( ) Prints a list of the specified directories under your include_path option.
phpini ( ) Prints a list of the configuration settings read from php.ini
post ( ) Prints a list of all the values from the $_POST array.
request ( ) Prints a list of all the values from the $_REQUEST array.
server ( ) Prints a list of all the values from the $_SERVER array.
session ( ) Prints a list of all the values from the $_SESSION array.
setConfig ( $config )
setLineNumberTestCallback ( $callback )
version ( ) : string Return Krumo version

Protected Methods

Method Description
getCharset ( )
heading ( $first, $code = '', $rest = '' )

Private Methods

Method Description
_array ( mixed $data, string $name ) Render a dump for an array
_boolean ( mixed $data, string $name ) Render a dump for a boolean value
_config ( string $group, string $name, mixed $fallback = null ) : mixed Returns values from Krumo's configuration
_css ( ) : boolean Print the skin (CSS)
_debug ( boolean $state = null ) : boolean Get\Set Krumo state: whether it is enabled or disabled
_dump ( mixed &$data, string $name = '…' ) Dump information about a variable
_float ( mixed $data, string $name ) Render a dump for a float value
_hive ( &$bee )
_integer ( mixed $data, string $name ) Render a dump for a integer value
_isCollapsed ( $level, $childCount ) : boolean Determines if a given node will be collapsed or not.
_marker ( ) : string Return the marked used to stain arrays and objects in order to detect recursions
_null ( string $name ) : string Render a dump for a NULL value
_object ( mixed &$data, string $name ) Render a dump for an object
_recursion ( ) Render a block that detected recursion
_resource ( mixed $data, string $name ) Render a dump for a resource
_string ( mixed $data, string $name ) Render a dump for a string value
_vars ( &$data ) Render a dump for the properties of an array or objeect
cli_dump ( )
isCli ( ) Detect if we're running in CLI mode`
is_assoc ( $var )
is_datetime ( $name, $value )
plural ( $number, $word ) : string Properly add "S" depending on the number of items static::plural(1,"show") = "show" static::plural(4,"show") = "shows"
sanitizeName ( $name )

Method Details

backtrace() public static method

Prints a debug backtrace
public static backtrace ( )

calculate_relative_path() public static method

Calculate the relative path of a given absolute URL
public static calculate_relative_path ( $file, $returnDir = false ) : string
$file string The file to calculate the relative path of
$returnDir bool If set to true, only return the dirname
return string

cascade() public static method

Each value in the array is the maximum number of entries that node can have before it is being collapsed. The last value is repeated for all further levels. Example: array(10,5,0) - Nodes from the first level are expanded if they have less than or equal to 10 child nodes. Nodes from the second level are ex- panded if they have less or equal to 5 nodes and all lower levels are collapsed. Note: To reset, simply call this function with no arguments.
public static cascade ( array $cascade = null )
$cascade array Cascading information

classes() public static method

Prints a list of all currently declared classes.
public static classes ( )

conf() public static method

Prints a list of all your configuration settings.
public static conf ( )

defines() public static method

Prints a list of all currently declared constants.
public static defines ( )

disable() public static method

Disable Krumo
public static disable ( ) : boolean
return boolean

dump() public static method

Dump information about a variable
public static dump ( $data, $second = '' ) : boolean
return boolean

enable() public static method

Enable Krumo
public static enable ( ) : boolean
return boolean

env() public static method

Prints a list of all the values from the $_ENV array.
public static env ( )

extensions() public static method

Prints a list of all currently loaded PHP extensions.
public static extensions ( )

functions() public static method

Prints a list of all currently declared functions.
public static functions ( )

get() public static method

Prints a list of all the values from the $_GET array.
public static get ( )

getCharset() protected static method

protected static getCharset ( )

get_icon() public static method

public static get_icon ( $name, $title )

get_separator() public static method

Get the separator to use for separating 'key' / 'value' pairs. Defaults to ' => '
public static get_separator ( ) : string
return string

headers() public static method

Prints a list of all HTTP request headers.
public static headers ( )

heading() protected static method

protected static heading ( $first, $code = '', $rest = '' )

htmlHeaders() public static method

public static htmlHeaders ( )

includes() public static method

Prints a list of all currently included (or required) files.
public static includes ( )

ini() public static method

Prints a list of all the values from an INI file.
public static ini ( string $ini_file ) : boolean
$ini_file string
return boolean

interfaces() public static method

Prints a list of all currently declared interfaces (PHP5 only).
public static interfaces ( )

path() public static method

Prints a list of the specified directories under your include_path option.
public static path ( )

phpini() public static method

Prints a list of the configuration settings read from php.ini
public static phpini ( )

post() public static method

Prints a list of all the values from the $_POST array.
public static post ( )

request() public static method

Prints a list of all the values from the $_REQUEST array.
public static request ( )

server() public static method

Prints a list of all the values from the $_SERVER array.
public static server ( )

session() public static method

Prints a list of all the values from the $_SESSION array.
public static session ( )

setConfig() public static method

public static setConfig ( $config )

setLineNumberTestCallback() public static method

public static setLineNumberTestCallback ( $callback )

version() public static method

Return Krumo version
public static version ( ) : string
return string

Property Details

$expand_all public_oe static_oe property

static::$expand_all = 1; krumo($my_array);
public static $expand_all

$sort public_oe static_oe property

public static $sort