Skip to content
docsv0.1.0

GeneratorInterface

A deterministic artifact generator (one per `coa:make <what>`).

GeneratorInterface::name()

abstract public function name(): string

The `<what>` token this generator answers to, e.g. 'entity'.

GeneratorInterface::generate()

abstract public function generate(Milpa\DevTools\Make\GenerationContext $context): Milpa\DevTools\Make\GenerationResult

Renders the artifact for `$context` and returns the planned file(s) plus its verify target.

Parameters

Parameters of generate()
NameTypeDescription
$contextMilpa\DevTools\Make\GenerationContext