Skip to content
Corex

GeneratorEngine

Corex\Cli\Generators\GeneratorEngine · class · CLI layer

The WP-CLI-independent core: resolve the target path from the Config-driven context, render the stub, and write the file idempotently (spec FR-002, FR-008). Throws on an invalid name (Naming) or an unresolved placeholder (StubRenderer) before writing anything; returns a structured GeneratorResult otherwise.

__construct(StubRenderer $renderer, Naming $naming, GeneratorContext $context, string $stubsDir)

Section titled “__construct(StubRenderer $renderer, Naming $naming, GeneratorContext $context, string $stubsDir)”

generate(Generator $generator, string $rawName, bool $force): GeneratorResult

Section titled “generate(Generator $generator, string $rawName, bool $force): GeneratorResult”