Flavor
The two controller conventions `coa:make controller` can target — see {@see ConventionDetector} for how one is chosen. - `Runtime`: a plain, dependency-free PSR-7 class (`index(ServerRequestInterface): ResponseInterface`, no base class, no `#[Route]`) wired through a `RouteProviderInterface` plugin — the `milpa/runtime` + skeleton convention. - `Legacy`: extends the host's `Milpa\app\Providers\BaseController` and routes via `#[Route]` attributes — the existing Milpa host convention (`src/Make/stubs/controller.php.stub`).
Flavor::fromOption()
public static function fromOption(string $value): selfParses a `--flavor` CLI value into a case.
Parameters
| Name | Type | Description |
|---|---|---|
| $value | string |
Throws
\InvalidArgumentException When `$value` is neither 'runtime' nor 'legacy'.
Flavor::cases()
public static function cases(): arrayFlavor::from()
public static function from(string|int $value): staticParameters
| Name | Type | Description |
|---|---|---|
| $value | string|int |
Flavor::tryFrom()
public static function tryFrom(string|int $value): ?staticParameters
| Name | Type | Description |
|---|---|---|
| $value | string|int |