PHP Класс Debug_Bar_Pretty_Output, vip-mu-plugins-public

Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$limit_recursion Whether to limit how deep the variable printing will recurse into an array/object.

Открытые методы

Метод Описание
get_ooutput ( object $obj, boolean $is_sub = false ) Helper Function specific to the Debug bar plugin.
get_output ( mixed $var, string $title = '', boolean $escape = true, string $space = '', boolean $short = false, integer $depth ) : string A not-so-pretty method to show pretty output ;-).
get_table ( array $array, string $col1, string $col2, string | array $class = null ) : string Retrieve the table output.
limit_recursion ( integer $depth ) Set the recursion limit.
ooutput ( object $obj, string $deprecated = null, boolean $is_sub = false ) : void Helper Function specific to the Debug bar plugin.
output ( mixed $var, string $title = '', boolean $escape = false, string $space = '', boolean $short = false, string $deprecated = null ) Print pretty output.
render_table ( array $array, string $col1, string $col2, string | array $class = null, string $deprecated = null ) : void Render the table output.
unset_recursion_limit ( ) Reset the recusion limit to it's default (unlimited).

Приватные методы

Метод Описание
get_object_info ( object $obj, boolean $escape, string $space, boolean $short, integer $depth ) : string Retrieve pretty output about objects.
get_pretty_bool ( boolean $bool, boolean $short = false ) : string Convert a boolean to pretty output.
get_pretty_float ( float $float, boolean $short = false ) : string Convert a float to pretty output.
get_pretty_int ( integer $int, boolean $short = false ) : string Convert an integer to pretty output.
get_pretty_null ( null $null, boolean $short = false ) : string Convert a null value to pretty output.
get_pretty_resource ( resource $resource, boolean $short = false ) : string Convert a resource to pretty output.
get_pretty_string ( string $string, boolean $short = false, boolean $escape = true ) : string Convert a string to pretty output.
get_table_end ( ) : string Generate table closing.
get_table_row ( mixed $key, mixed $value ) : string Generate individual table row.
get_table_rows ( array $array ) : string Generate table rows.
get_table_start ( string $col1, string $col2, string | array $class = null, boolean $double_it = false ) Generate the table header.
object_info ( object $obj, boolean $escape, string $space, boolean $short, string $deprecated = null ) : void Print pretty output about objects.

Описание методов

get_ooutput() публичный статический Метод

Retrieves html string of properties in a table and methods in an unordered list.
С версии: 1.3
public static get_ooutput ( object $obj, boolean $is_sub = false )
$obj object Object for which to show the properties and methods.
$is_sub boolean (internal) Top level or nested object.

get_output() публичный статический Метод

A not-so-pretty method to show pretty output ;-).
С версии: 1.3
public static get_output ( mixed $var, string $title = '', boolean $escape = true, string $space = '', boolean $short = false, integer $depth ) : string
$var mixed Variable to show.
$title string (optional) Variable title.
$escape boolean (optional) Whether to character escape the textual output.
$space string (internal) Indentation spacing.
$short boolean (internal) Short or normal annotation.
$depth integer (internal) The depth of the current recursion.
Результат string

get_table() публичный статический Метод

Retrieve the table output.
С версии: 1.3
public static get_table ( array $array, string $col1, string $col2, string | array $class = null ) : string
$array array Array to be shown in the table.
$col1 string Label for the first table column.
$col2 string Label for the second table column.
$class string | array One or more CSS classes to add to the table.
Результат string

limit_recursion() публичный статический Метод

Always make sure you also unset the limit after you're done with this class so as not to impact other plugins which may be using this printing class.
С версии: 1.4
public static limit_recursion ( integer $depth )
$depth integer Maximum recursion depth.

ooutput() публичный статический Метод

Outputs properties in a table and methods in an unordered list.
Устаревший: since v1.3 in favour of get_ooutput().
public static ooutput ( object $obj, string $deprecated = null, boolean $is_sub = false ) : void
$obj object Object for which to show the properties and methods.
$deprecated string ==Deprecated argument.
$is_sub boolean (internal) Top level or nested object.
Результат void

output() публичный статический Метод

Print pretty output.
Устаревший: since v1.3 in favour of get_output().
public static output ( mixed $var, string $title = '', boolean $escape = false, string $space = '', boolean $short = false, string $deprecated = null )
$var mixed Variable to show.
$title string (optional) Variable title.
$escape boolean (optional) Whether to character escape the textual output.
$space string (internal) Indentation spacing.
$short boolean (internal) Short or normal annotation.
$deprecated string ==Deprecated argument.

render_table() публичный статический Метод

Render the table output.
Устаревший: since v1.3 in favour of get_table().
public static render_table ( array $array, string $col1, string $col2, string | array $class = null, string $deprecated = null ) : void
$array array Array to be shown in the table.
$col1 string Label for the first table column.
$col2 string Label for the second table column.
$class string | array One or more CSS classes to add to the table.
$deprecated string ==Deprecated argument.
Результат void

unset_recursion_limit() публичный статический Метод

Reset the recusion limit to it's default (unlimited).
С версии: 1.4
public static unset_recursion_limit ( )

Описание свойств

$limit_recursion защищенное статическое свойство

Whether to limit how deep the variable printing will recurse into an array/object.
С версии: 1.4
protected static $limit_recursion