Documentation

TimeHandler extends AbstractHandler
in package

Debug time handler class

Tags
category

Pop

author

Nick Sagona, III dev@nolainteractive.com

copyright

Copyright (c) 2009-2024 NOLA Interactive, LLC. (http://www.nolainteractive.com)

license

http://www.popphp.org/license New BSD License

version
2.2.0

Table of Contents

Properties

$logger  : Logger|null
Logger object
$loggingParams  : array<string|int, mixed>
Logging params
$name  : string|null
Name of time measurement
$start  : float|null
Start time
$stop  : float|null
Stop time

Methods

__construct()  : mixed
Constructor
getElapsed()  : string
Get elapsed time
getLogger()  : Logger|null
Get logger
getLoggingParams()  : array<string|int, mixed>
Get logging params
getName()  : string|null
Get name
getStart()  : float|null
Get start value
getStop()  : float
Get stop value
hasLogger()  : bool
Has logger
hasLoggingParams()  : bool
Has logging parameters
hasName()  : bool
Has name
hasStarted()  : bool
Determined if the timer has started
hasStopped()  : bool
Determined if the timer has stopped
log()  : void
Trigger handler logging
prepare()  : array<string|int, mixed>
Prepare handler data for storage
prepareAsString()  : string
Prepare handler data as string
prepareHeaderAsString()  : string
Prepare header string
setLogger()  : AbstractHandler
Set logger
setLoggingParams()  : AbstractHandler
Set logger
setName()  : AbstractHandler
Set name
start()  : TimeHandler
Start timer
stop()  : TimeHandler
Stop timer

Properties

$loggingParams

Logging params

protected array<string|int, mixed> $loggingParams = []

$start

Start time

protected float|null $start = null

Methods

__construct()

Constructor

public __construct([bool $start = true ][, string|null $name = null ][, Logger|null $logger = null ][, array<string|int, mixed> $loggingParams = [] ]) : mixed

Instantiate a time handler object

Parameters
$start : bool = true
$name : string|null = null
$logger : Logger|null = null
$loggingParams : array<string|int, mixed> = []

getElapsed()

Get elapsed time

public getElapsed() : string
Return values
string

getLoggingParams()

Get logging params

public getLoggingParams() : array<string|int, mixed>
Return values
array<string|int, mixed>

getName()

Get name

public getName() : string|null
Return values
string|null

getStart()

Get start value

public getStart() : float|null
Return values
float|null

getStop()

Get stop value

public getStop() : float
Return values
float

hasLogger()

Has logger

public hasLogger() : bool
Return values
bool

hasLoggingParams()

Has logging parameters

public hasLoggingParams() : bool
Return values
bool

hasStarted()

Determined if the timer has started

public hasStarted() : bool
Return values
bool

hasStopped()

Determined if the timer has stopped

public hasStopped() : bool
Return values
bool

prepare()

Prepare handler data for storage

public prepare() : array<string|int, mixed>
Return values
array<string|int, mixed>

prepareAsString()

Prepare handler data as string

public prepareAsString() : string
Return values
string

prepareHeaderAsString()

Prepare header string

public prepareHeaderAsString() : string
Return values
string

        
On this page

Search results