PHP Class Rarst\Laps\Laps

Show file Open project: rarst/laps

Public Properties

Property Type Description
$events
$query_starts
$stopwatch Symfony\Component\Stopwatch\Stopwatch

Public Methods

Method Description
add_events ( array $stops ) Hook events by name and priority from array.
admin_bar_menu ( WP_Admin_Bar $wp_admin_bar ) Render interface and add to the toolbar.
after_setup_theme ( ) When theme is done possibly add vendor-specific events.
enqueue_scripts ( )
http_api_debug ( array | WP_Error $response, string $type, object $class, array $args, string $url ) : mixed Capture end time of HTTP request
init ( )
on_load ( ) Start Stopwatch and timing plugin load immediately, then set up core events and needed hooks.
pre_http_request ( boolean $false, array $args, string $url ) : boolean Capture start time of HTTP request
pre_update_option_active_plugins ( array $plugins ) : array Reorder active plugins so Laps is first and starts timing load early.
query ( string $query ) : string Capture SQL queries start times
tick ( mixed $input = null ) : mixed Mark action for the event on Stopwatch.

Method Details

add_events() public static method

Hook events by name and priority from array.
public static add_events ( array $stops )
$stops array

admin_bar_menu() public static method

Render interface and add to the toolbar.
public static admin_bar_menu ( WP_Admin_Bar $wp_admin_bar )
$wp_admin_bar WP_Admin_Bar

after_setup_theme() public static method

When theme is done possibly add vendor-specific events.
public static after_setup_theme ( )

enqueue_scripts() public static method

public static enqueue_scripts ( )

http_api_debug() public static method

Capture end time of HTTP request
public static http_api_debug ( array | WP_Error $response, string $type, object $class, array $args, string $url ) : mixed
$response array | WP_Error
$type string
$class object
$args array
$url string
return mixed

init() public static method

public static init ( )

on_load() public static method

Start Stopwatch and timing plugin load immediately, then set up core events and needed hooks.
public static on_load ( )

pre_http_request() public static method

Capture start time of HTTP request
public static pre_http_request ( boolean $false, array $args, string $url ) : boolean
$false boolean
$args array
$url string
return boolean

pre_update_option_active_plugins() public static method

Reorder active plugins so Laps is first and starts timing load early.
public static pre_update_option_active_plugins ( array $plugins ) : array
$plugins array
return array

query() public static method

Capture SQL queries start times
public static query ( string $query ) : string
$query string
return string

tick() public static method

Mark action for the event on Stopwatch.
public static tick ( mixed $input = null ) : mixed
$input mixed pass through if added to filter
return mixed

Property Details

$events public static property

public static $events

$query_starts public static property

public static $query_starts

$stopwatch public static property

public static Stopwatch,Symfony\Component\Stopwatch $stopwatch
return Symfony\Component\Stopwatch\Stopwatch