PHP Класс The_SEO_Framework\Debug

Holds plugin debug functions.
С версии: 2.7.1
Наследование: implements the_seo_framework\Debug_Interface
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$the_seo_framework_debug Cached debug/profile properties.
$the_seo_framework_debug_hidden

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

Свойство Тип Описание
$add_debug_output Whether to accumulate data.
$debug_output Enqueue the debug output.

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

Метод Описание
_deprecated_filter ( string $filter, string $version, string $replacement = null ) Mark a filter as deprecated and inform when it has been used.
_deprecated_function ( string $function, string $version, string $replacement = null ) Mark a function as deprecated and inform when it has been used.
_doing_it_wrong ( string $function, string $message, string $version ) Mark a function as deprecated and inform when it has been used.
_inaccessible_p_or_m ( string $p_or_m, string $message = '' ) Mark a property or method inaccessible when it has been used.
debug_init ( string $method, boolean $store, double $debug_key ) : void Debug init. Simplified way of debugging a function, only works in admin.
debug_key_wrapper ( string $key, boolean $ignore = false ) : string Wrap debug key in a colored span.
debug_output ( ) Echos debug output.
debug_screens ( ) Adds found screens in the admin footer when debugging is enabled.
debug_value_wrapper ( string $value, boolean $ignore = false ) : string Wrap debug value in a colored span.
get_debug_information ( mixed $values = null ) : string Parses input values and wraps them in human-readable elements.
get_instance ( ) : object Gets the class instance. It's set when it's null.
has_debug_output ( ) : boolean Determines if there's debug output.
output_debug ( ) Outputs the debug_output property.
output_debug_header ( ) Outputs the debug header.
output_debug_query ( ) Outputs debug query.
profile ( boolean $echo = false, boolean $from_last = false, string $what = 'time', string $key = '' ) : float Count the timings and memory usage.
set_instance ( $debug = null, $hidden = null ) Sets the class instance.

Защищенные методы

Метод Описание
__clone ( ) Cloning of this object is forbidden.
__construct ( ) Constructor.
__wakeup ( ) Unserializing instances of this object is forbidden.
error_handler ( array $error, string $message ) Echos error.
error_handler_deprecated ( $code, $message ) The SEO Framework error handler.
error_handler_doing_it_wrong ( $code, $message ) The SEO Framework error handler.
error_handler_inaccessible_call ( $code, $message ) The SEO Framework error handler.
get_debug_header_output ( ) : string Wraps header output in front-end code.
get_debug_query_output ( ) : string Wraps query status booleans in human-readable code.
timer ( $reset = false ) : float Times code until it's called again.

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

__clone() закрытый защищенный Метод

Cloning of this object is forbidden.
final protected __clone ( )

__construct() закрытый защищенный Метод

Constructor.
final protected __construct ( )

__wakeup() закрытый защищенный Метод

Unserializing instances of this object is forbidden.
final protected __wakeup ( )

_deprecated_filter() публичный Метод

Mark a filter as deprecated and inform when it has been used.
С версии: 2.7.1
public _deprecated_filter ( string $filter, string $version, string $replacement = null )
$filter string The function that was called.
$version string The version of WordPress that deprecated the function.
$replacement string Optional. The function that should have been called. Default null.

_deprecated_function() публичный Метод

Taken from WordPress core, but added extra parameters and linguistic alterations. The current behavior is to trigger a user error if WP_DEBUG is true.
С версии: 2.6.0
public _deprecated_function ( string $function, string $version, string $replacement = null )
$function string The function that was called.
$version string The version of WordPress that deprecated the function.
$replacement string Optional. The function that should have been called. Default null.

_doing_it_wrong() публичный Метод

Taken from WordPress core, but added extra parameters and linguistic alterations. The current behavior is to trigger a user error if WP_DEBUG is true.
С версии: 2.6.0
public _doing_it_wrong ( string $function, string $message, string $version )
$function string The function that was called.
$message string A message explaining what has been done incorrectly.
$version string The version of WordPress where the message was added.

_inaccessible_p_or_m() публичный Метод

The current behavior is to trigger a user error if WP_DEBUG is true.
С версии: 2.7.0
public _inaccessible_p_or_m ( string $p_or_m, string $message = '' )
$p_or_m string The Property or Method.
$message string A message explaining what has been done incorrectly.

debug_init() публичный Метод

Debug init. Simplified way of debugging a function, only works in admin.
С версии: 2.6.0
public debug_init ( string $method, boolean $store, double $debug_key ) : void
$method string The function name.
$store boolean Whether to store the output in cache for next run to pick up on.
$debug_key double Use $debug_key as variable, it's reserved.
Результат void early if debugging is disabled or when storing cache values.

debug_key_wrapper() публичный Метод

Wrap debug key in a colored span.
С версии: 2.3.9
public debug_key_wrapper ( string $key, boolean $ignore = false ) : string
$key string The debug key.
$ignore boolean Ignore the hidden output.
Результат string

debug_output() публичный Метод

Echos debug output.
С версии: 2.6.0
С версии: 2.7.1 is now static.
public debug_output ( )

debug_screens() публичный Метод

Adds found screens in the admin footer when debugging is enabled.
С версии: 2.5.2
public debug_screens ( )

debug_value_wrapper() публичный Метод

Wrap debug value in a colored span.
С версии: 2.3.9
public debug_value_wrapper ( string $value, boolean $ignore = false ) : string
$value string The debug value.
$ignore boolean Ignore the hidden output.
Результат string

error_handler() защищенный Метод

Echos error.
С версии: 2.6.0
protected error_handler ( array $error, string $message )
$error array The Error location and file.
$message string The error message.

error_handler_deprecated() защищенный Метод

Only handles notices.
См. также: E_USER_NOTICE
С версии: 2.6.0
protected error_handler_deprecated ( $code, $message )

error_handler_doing_it_wrong() защищенный Метод

Only handles notices.
См. также: E_USER_NOTICE
С версии: 2.6.0
protected error_handler_doing_it_wrong ( $code, $message )

error_handler_inaccessible_call() защищенный Метод

Only handles notices.
См. также: E_USER_NOTICE
С версии: 2.6.0
protected error_handler_inaccessible_call ( $code, $message )

get_debug_header_output() защищенный Метод

This won't consider hiding the output.
С версии: 2.6.5
protected get_debug_header_output ( ) : string
Результат string Wrapped SEO meta tags output.

get_debug_information() публичный Метод

Parses input values and wraps them in human-readable elements.
С версии: 2.6.0
public get_debug_information ( mixed $values = null ) : string
$values mixed Values to be parsed.
Результат string $output The parsed value.

get_debug_query_output() защищенный Метод

Wraps query status booleans in human-readable code.
С версии: 2.6.6
protected get_debug_query_output ( ) : string
Результат string Wrapped Query State debug output.

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

Gets the class instance. It's set when it's null.
С версии: 2.7.1
public static get_instance ( ) : object
Результат object The current instance.

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

Determines if there's debug output.
С версии: 2.7.1
public static has_debug_output ( ) : boolean
Результат boolean True if there's output.

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

Outputs the debug_output property.
С версии: 2.7.1
public static output_debug ( )

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

Outputs the debug header.
С версии: 2.7.1
public static output_debug_header ( )

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

Outputs debug query.
С версии: 2.7.1
public static output_debug_query ( )

profile() публичный Метод

Memory usage fetching is unreliable, i.e. Opcode.
С версии: 2.6.0
public profile ( boolean $echo = false, boolean $from_last = false, string $what = 'time', string $key = '' ) : float
$echo boolean Whether to echo the total plugin time.
$from_last boolean Whether to echo the differences from the last timing.
$what string Whether to return the time or memory.
$key string When used, it will detach the profiling separately.
Результат float The timer in seconds. Or memory in Bytes when $what is 'memory'.

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

Sets the class instance.
С версии: 2.7.1
public static set_instance ( $debug = null, $hidden = null )

timer() защищенный Метод

Times code until it's called again.
С версии: 2.6.0
protected timer ( $reset = false ) : float
Результат float PHP Microtime for code execution.

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

$add_debug_output защищенное свойство

Whether to accumulate data.
С версии: 2.6.5
protected $add_debug_output

$debug_output защищенное свойство

Enqueue the debug output.
С версии: 2.6.0
protected $debug_output

$the_seo_framework_debug публичное свойство

Cached debug/profile properties.
С версии: 2.7.1
public $the_seo_framework_debug

$the_seo_framework_debug_hidden публичное свойство

public $the_seo_framework_debug_hidden