Debugger
in package
implements
ArrayAccess, Countable, IteratorAggregate
Debugger class
Tags
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
$storage
Debugger storage object
protected
StorageInterface|null
$storage
= 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
__toString()
Render to string
public
__toString() : string
Return values
string__unset()
Unset a handler
public
__unset(string $name) : void
Parameters
- $name : string
addHandler()
Add a handler
public
addHandler(HandlerInterface $handler) : Debugger
Parameters
- $handler : HandlerInterface
Return values
DebuggeraddHandlers()
Add handlers
public
addHandlers(array<string|int, mixed> $handlers) : Debugger
Parameters
- $handlers : array<string|int, mixed>
Return values
DebuggeraddLogger()
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
Debuggerclear()
Clear storage
public
clear() : void
count()
Method to get the count of the handlers
public
count() : int
Return values
intdelete()
Delete debug data by ID
public
delete(string $id) : void
Parameters
- $id : string
generateId()
Generate unique ID
public
generateId() : string
Return values
stringgetById()
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>getHandler()
Get a handler
public
getHandler(string $name) : HandlerInterface|null
Parameters
- $name : string
Return values
HandlerInterface|nullgetHandlers()
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
ArrayIteratorgetRequestId()
Get current request ID
public
getRequestId() : string
Return values
stringgetStorage()
Get the storage object
public
getStorage() : StorageInterface
Return values
StorageInterfacehas()
Determine if debug data exists by ID
public
has(string $id) : bool
Parameters
- $id : string
Return values
boolhasHandler()
Determine if the debug object has a handler
public
hasHandler(string $name) : bool
Parameters
- $name : string
Return values
boolhasStorage()
Determine if the debug object has storage
public
hasStorage() : bool
Return values
booloffsetExists()
ArrayAccess offsetExists
public
offsetExists(mixed $offset) : bool
Parameters
- $offset : mixed
Return values
booloffsetGet()
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
offsetUnset()
ArrayAccess offsetUnset
public
offsetUnset(mixed $offset) : void
Parameters
- $offset : mixed
render()
Render the debug handlers' data to string
public
render() : string
Return values
stringrenderWithHeaders()
Render the debug handlers' data to string with headers
public
renderWithHeaders() : string
Return values
stringsave()
Save the debug handlers' data to storage
public
save() : string
Return values
stringsetStorage()
Set the storage object
public
setStorage(StorageInterface $storage) : Debugger
Parameters
- $storage : StorageInterface