Returns the contents of the file for this frame as an array of lines, and optionally as a clamped range of lines.NOTE: lines are 0-indexed
Get all lines for this file
$frame->getFileLines(); // => array( 0 => '<?php', 1 => '...', ...)
{
{
}
public function getFile($shortened =
false)
{
if (empty($this->frame['file'])) {
return null;
}
$file = $this->frame[
'file'];
if (preg_match(
'/^(.*)\((\d+)\) : (?:eval\(\)\'d|assert) code$/',
$file, $matches)) {
$file = $this->frame[
'file'] = $matches[1];
$this->frame['line'] = (int) $matches[2];
}
if ($shortened && is_string(
$file)) {
$dirname = dirname(dirname(dirname(dirname(dirname(dirname(__DIR__))))));
if ($dirname !== '/') {
}
}
}
{
return isset($this->frame['line']) ? $this->frame['line'] : null;
}
{
return isset($this->frame['class']) ? $this->frame['class'] : null;
}
{
return isset($this->frame['function']) ? $this->frame['function'] : null;
}
{
return isset($this->frame[
'args']) ? (
array) $this->frame[
'args'] : [];
}
{
if ($this->fileContentsCache === null && $filePath = $this->
getFile()) {
if ($filePath === "Unknown") {
return null;
}
if (!is_file($filePath)) {
return null;
}
$this->fileContentsCache = file_get_contents($filePath);
}
}
{
'context' => $context,
];
}
{
if ($filter !== null) {
return $c['context'] == $filter;
});
}
}
{
}
{
if ($length !== null) {
$length = (int) $length;
}
if ($length <= 0) {
"\$length($length) cannot be lower or equal to 0"
);
}
$lines = array_slice($lines,
$start, $length,
true);
}
return $lines;
}
}
{
}
}
{
if (!empty(
$frame[
'_comments'])) {
}
}
{
return false;
}
return $frame->getFile() === $this->
getFile() && $frame->getLine() === $this->
getLine();
}
{
}
{
}
}