Frame
in package
Table of Contents
Properties
- $application : bool
- $comments : array<string|int, array<string|int, mixed>>
- $fileContentsCache : string
- $frame : array<string|int, mixed>
Methods
- __construct() : mixed
- addComment() : mixed
- Adds a comment to this frame, that can be received and used by other handlers. For example, the PrettyPage handler can attach these comments under the code for each frame.
- equals() : bool
- Compares Frame against one another
- getArgs() : array<string|int, mixed>
- getClass() : string|null
- getComments() : array<string|int, array<string|int, mixed>>
- Returns all comments for this frame. Optionally allows a filter to only retrieve comments from a specific context.
- getFile() : string|null
- getFileContents() : string|null
- Returns the full contents of the file for this frame, if it's known.
- getFileLines() : array<string|int, string>|null
- Returns the contents of the file for this frame as an array of lines, and optionally as a clamped range of lines.
- getFunction() : string|null
- getLine() : int|null
- getRawFrame() : array<string|int, mixed>
- Returns the array containing the raw frame data from which this Frame object was built
- isApplication() : bool
- Returns whether this frame belongs to the application or not.
- serialize() : string
- Implements the Serializable interface, with special steps to also save the existing comments.
- setApplication() : mixed
- Mark as an frame belonging to the application.
- unserialize() : mixed
- Unserializes the frame data, while also preserving any existing comment data.
Properties
$application
protected
bool
$application
$comments
protected
array<string|int, array<string|int, mixed>>
$comments
= []
$fileContentsCache
protected
string
$fileContentsCache
$frame
protected
array<string|int, mixed>
$frame
Methods
__construct()
public
__construct(array<string|int, mixed> $frame) : mixed
Parameters
- $frame : array<string|int, mixed>
addComment()
Adds a comment to this frame, that can be received and used by other handlers. For example, the PrettyPage handler can attach these comments under the code for each frame.
public
addComment(string $comment[, string $context = 'global' ]) : mixed
An interesting use for this would be, for example, code analysis & annotations.
Parameters
- $comment : string
- $context : string = 'global'
-
Optional string identifying the origin of the comment
equals()
Compares Frame against one another
public
equals(Frame $frame) : bool
Parameters
- $frame : Frame
Return values
boolgetArgs()
public
getArgs() : array<string|int, mixed>
Return values
array<string|int, mixed>getClass()
public
getClass() : string|null
Return values
string|nullgetComments()
Returns all comments for this frame. Optionally allows a filter to only retrieve comments from a specific context.
public
getComments([string $filter = null ]) : array<string|int, array<string|int, mixed>>
Parameters
- $filter : string = null
Return values
array<string|int, array<string|int, mixed>>getFile()
public
getFile([bool $shortened = false ]) : string|null
Parameters
- $shortened : bool = false
Return values
string|nullgetFileContents()
Returns the full contents of the file for this frame, if it's known.
public
getFileContents() : string|null
Return values
string|nullgetFileLines()
Returns the contents of the file for this frame as an array of lines, and optionally as a clamped range of lines.
public
getFileLines([int $start = 0 ][, int $length = null ]) : array<string|int, string>|null
NOTE: lines are 0-indexed
Parameters
- $start : int = 0
- $length : int = null
Tags
Return values
array<string|int, string>|nullgetFunction()
public
getFunction() : string|null
Return values
string|nullgetLine()
public
getLine() : int|null
Return values
int|nullgetRawFrame()
Returns the array containing the raw frame data from which this Frame object was built
public
getRawFrame() : array<string|int, mixed>
Return values
array<string|int, mixed>isApplication()
Returns whether this frame belongs to the application or not.
public
isApplication() : bool
Return values
boolserialize()
Implements the Serializable interface, with special steps to also save the existing comments.
public
serialize() : string
Tags
Return values
stringsetApplication()
Mark as an frame belonging to the application.
public
setApplication(bool $application) : mixed
Parameters
- $application : bool
unserialize()
Unserializes the frame data, while also preserving any existing comment data.
public
unserialize(string $serializedFrame) : mixed
Parameters
- $serializedFrame : string