Skip to content
docsv0.1.0

StubRenderer

Renders a `*.php.stub` template: replaces every `{{key}}` token with the matching value. Generators compose repeated blocks (e.g. per-field properties) by rendering a partial stub per item and joining the result, then feed it in as a single placeholder value.

StubRenderer::render()

public function render(string $stubPath, array $vars): string

Renders `$stubPath`, replacing every `{{key}}` token from `$vars`; throws if any placeholder is left unreplaced.

Parameters

Parameters of render()
NameTypeDescription
$stubPathstring
$varsarray<string, string>