PHP Class Krumo

This class stores the Krumo API for rendering and displaying the structured information it is reporting
Afficher le fichier Open project: mmucklo/krumo Class Usage Examples

Méthodes publiques

Свойство Type Description
$expand_all static::$expand_all = 1; krumo($my_array);
$sort

Méthodes publiques

Méthode 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

Méthodes protégées

Méthode Description
getCharset ( )
heading ( $first, $code = '', $rest = '' )

Private Methods

Méthode 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 méthode

Prints a debug backtrace
public static backtrace ( )

calculate_relative_path() public static méthode

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
Résultat string

cascade() public static méthode

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 méthode

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

conf() public static méthode

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

defines() public static méthode

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

disable() public static méthode

Disable Krumo
public static disable ( ) : boolean
Résultat boolean

dump() public static méthode

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

enable() public static méthode

Enable Krumo
public static enable ( ) : boolean
Résultat boolean

env() public static méthode

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

extensions() public static méthode

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

functions() public static méthode

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

get() public static méthode

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

getCharset() protected static méthode

protected static getCharset ( )

get_icon() public static méthode

public static get_icon ( $name, $title )

get_separator() public static méthode

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

headers() public static méthode

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

heading() protected static méthode

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

htmlHeaders() public static méthode

public static htmlHeaders ( )

includes() public static méthode

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

ini() public static méthode

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

interfaces() public static méthode

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

path() public static méthode

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

phpini() public static méthode

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

post() public static méthode

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

request() public static méthode

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

server() public static méthode

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

session() public static méthode

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

setConfig() public static méthode

public static setConfig ( $config )

setLineNumberTestCallback() public static méthode

public static setLineNumberTestCallback ( $callback )

version() public static méthode

Return Krumo version
public static version ( ) : string
Résultat 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