CompilesEchos
trait CompilesEchos
Properties
| protected array<string, callable> | $echoHandlers | Custom rendering callbacks for stringable objects. |
Methods
Add a handler to be executed before echoing a given class.
Compile Blade echos into valid PHP.
Get the echo methods in the proper order for compilation.
Compile the "raw" echo statements.
Compile the "regular" echo statements.
Compile the escaped echo statements.
Add an instance of the blade echo handler to the start of the compiled string.
Wrap the echoable value in an echo handler if applicable.
Apply the echo handler for the value if it exists.
Details
at line 25
void
stringable(Closure|string $class, callable|null $handler = null)
Add a handler to be executed before echoing a given class.
Boot-only. The handler persists on the singleton BladeCompiler for the worker lifetime and applies to every subsequent rendered echo.
at line 37
string
compileEchos(string $value)
Compile Blade echos into valid PHP.
at line 51
protected array
getEchoMethods()
Get the echo methods in the proper order for compilation.
at line 63
protected string
compileRawEchos(string $value)
Compile the "raw" echo statements.
at line 81
protected string
compileRegularEchos(string $value)
Compile the "regular" echo statements.
at line 99
protected string
compileEscapedEchos(string $value)
Compile the escaped echo statements.
at line 117
protected string
addBladeCompilerVariable(string $result)
Add an instance of the blade echo handler to the start of the compiled string.
at line 125
protected string
wrapInEchoHandler(string $value)
Wrap the echoable value in an echo handler if applicable.
at line 139
mixed
applyEchoHandler(mixed $value)
Apply the echo handler for the value if it exists.