Skip to content
PHP Ecosystem
Explore

ToolbarInjector

API reference › Debug Core › Toolbar › ToolbarInjector

final classPHPForge\Debug\Toolbar\ToolbarInjector
Sourcesrc/Toolbar/ToolbarInjector.php

Places rendered toolbar markup inside an already-rendered HTML response.

MethodDescriptionDefined by
inject() staticInjects toolbar markup immediately before the final closing body tag.ToolbarInjector
public static function inject(string $html, string $toolbar): string

Injects toolbar markup immediately before the final closing body tag.

Parameters

ParameterTypeDescription
$htmlstringResponse HTML.
$toolbarstringRendered toolbar markup.

Returns

string: HTML containing the toolbar, appended when no closing body tag exists.