BladeMapper
class BladeMapper
Methods
Map cached view paths to their original paths.
Find the compiled view file for the given compiled path.
Get the list of known paths from the compiler engine.
Filter out the view data that should not be shown in the exception report.
Detect the line number in the original blade file.
Compile the source map for the given blade file.
Add line numbers to echo statements.
Add line numbers to blade statements.
Add line numbers to blade components.
Insert a line number at the given position.
Trim empty lines from the given value.
Find the closest line number mapping in the given source map.
Details
at line 53
__construct(BladeCompiler $bladeCompiler)
Create a new Blade mapper instance.
at line 61
FlattenException
map(FlattenException $exception)
Map cached view paths to their original paths.
at line 87
string|null
findCompiledView(string $compiledPath)
Find the compiled view file for the given compiled path.
at line 100
protected array
getKnownPaths()
Get the list of known paths from the compiler engine.
In Hypervel, compiled paths are stored in coroutine Context (not an instance property) because the CompilerEngine is a process-global singleton in Swoole.
at line 124
protected array
filterViewData(array $data)
Filter out the view data that should not be shown in the exception report.
at line 138
int
detectLineNumber(string $filename, int $compiledLineNumber)
Detect the line number in the original blade file.
at line 154
protected string
compileSourcemap(string $value)
Compile the source map for the given blade file.
at line 176
protected string
addEchoLineNumbers(string $value)
Add line numbers to echo statements.
at line 199
protected string
addStatementLineNumbers(string $value)
Add line numbers to blade statements.
at line 222
protected string
addBladeComponentLineNumbers(string $value)
Add line numbers to blade components.
at line 245
protected string
insertLineNumberAtPosition(int $position, string $value)
Insert a line number at the given position.
at line 257
protected string
trimEmptyLines(string $value)
Trim empty lines from the given value.
at line 267
protected int
findClosestLineNumberMapping(string $map, int $compiledLineNumber)
Find the closest line number mapping in the given source map.