Documentation

Debugger
in package
implements ArrayAccess, Countable, IteratorAggregate

Debugger 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

Interfaces

ArrayAccess
Countable
IteratorAggregate

Properties

$handlers  : array<string|int, mixed>
Debugger handlers
$requestId  : string|null
Debugger request ID
$storage  : StorageInterface|null
Debugger storage object

Methods

__construct()  : mixed
Constructor
__get()  : mixed
Get a handler
__isset()  : bool
Is handler set
__set()  : void
Set a handler
__toString()  : string
Render to string
__unset()  : void
Unset a handler
addHandler()  : Debugger
Add a handler
addHandlers()  : Debugger
Add handlers
addLogger()  : Debugger
Add logger to handler(s)
clear()  : void
Clear storage
count()  : int
Method to get the count of the handlers
delete()  : void
Delete debug data by ID
generateId()  : string
Generate unique ID
getById()  : mixed
Get stored request by ID
getByType()  : mixed
Get stored request by type
getData()  : array<string|int, mixed>
Get all data from handlers
getHandler()  : HandlerInterface|null
Get a handler
getHandlers()  : array<string|int, mixed>
Get all handlers
getIterator()  : ArrayIterator
Method to iterate over the handlers
getRequestId()  : string
Get current request ID
getStorage()  : StorageInterface
Get the storage object
has()  : bool
Determine if debug data exists by ID
hasHandler()  : bool
Determine if the debug object has a handler
hasStorage()  : bool
Determine if the debug object has storage
offsetExists()  : bool
ArrayAccess offsetExists
offsetGet()  : mixed
ArrayAccess offsetGet
offsetSet()  : void
ArrayAccess offsetSet
offsetUnset()  : void
ArrayAccess offsetUnset
render()  : string
Render the debug handlers' data to string
renderWithHeaders()  : string
Render the debug handlers' data to string with headers
save()  : string
Save the debug handlers' data to storage
setStorage()  : Debugger
Set the storage object

Properties

$handlers

Debugger handlers

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

$requestId

Debugger request ID

protected string|null $requestId = null

Methods

__construct()

Constructor

public __construct() : mixed

Instantiate a debug object

__get()

Get a handler

public __get(string $name) : mixed
Parameters
$name : string

__isset()

Is handler set

public __isset(string $name) : bool
Parameters
$name : string
Return values
bool

__set()

Set a handler

public __set(string $name, mixed $value) : void
Parameters
$name : string
$value : mixed
Tags
throws
Exception

__toString()

Render to string

public __toString() : string
Return values
string

__unset()

Unset a handler

public __unset(string $name) : void
Parameters
$name : string

addHandlers()

Add handlers

public addHandlers(array<string|int, mixed> $handlers) : Debugger
Parameters
$handlers : array<string|int, mixed>
Return values
Debugger

addLogger()

Add logger to handler(s)

public addLogger(Logger $logger, array<string|int, mixed> $loggingParams) : Debugger
Parameters
$logger : Logger
$loggingParams : array<string|int, mixed>
Return values
Debugger

clear()

Clear storage

public clear() : void

count()

Method to get the count of the handlers

public count() : int
Return values
int

delete()

Delete debug data by ID

public delete(string $id) : void
Parameters
$id : string

generateId()

Generate unique ID

public generateId() : string
Return values
string

getById()

Get stored request by ID

public getById(string $id) : mixed
Parameters
$id : string

getByType()

Get stored request by type

public getByType(string $type) : mixed
Parameters
$type : string

getData()

Get all data from handlers

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

getHandlers()

Get all handlers

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

getIterator()

Method to iterate over the handlers

public getIterator() : ArrayIterator
Return values
ArrayIterator

getRequestId()

Get current request ID

public getRequestId() : string
Return values
string

has()

Determine if debug data exists by ID

public has(string $id) : bool
Parameters
$id : string
Return values
bool

hasHandler()

Determine if the debug object has a handler

public hasHandler(string $name) : bool
Parameters
$name : string
Return values
bool

hasStorage()

Determine if the debug object has storage

public hasStorage() : bool
Return values
bool

offsetExists()

ArrayAccess offsetExists

public offsetExists(mixed $offset) : bool
Parameters
$offset : mixed
Return values
bool

offsetGet()

ArrayAccess offsetGet

public offsetGet(mixed $offset) : mixed
Parameters
$offset : mixed

offsetSet()

ArrayAccess offsetSet

public offsetSet(mixed $offset, mixed $value) : void
Parameters
$offset : mixed
$value : mixed
Tags
throws
Exception

offsetUnset()

ArrayAccess offsetUnset

public offsetUnset(mixed $offset) : void
Parameters
$offset : mixed

render()

Render the debug handlers' data to string

public render() : string
Return values
string

renderWithHeaders()

Render the debug handlers' data to string with headers

public renderWithHeaders() : string
Return values
string

save()

Save the debug handlers' data to storage

public save() : string
Return values
string

        
On this page

Search results