SchemaForm
The public entry point: parse a tool/operation input schema into a FormDefinition, and bind raw input into a typed, validated FormSubmission. A thin facade over SchemaFormParser + FormBinder; `bind` deliberately lives here (and on the binder), never on the FormDefinition value object. SchemaForm neither renders nor executes.
SchemaForm::__construct()
public function __construct(Milpa\Live\Schema\SchemaFormParser $parser = new SchemaFormParser(), Milpa\Live\Schema\FormBinder $binder = new FormBinder()):Parameters
| Name | Type | Description |
|---|---|---|
| $parser | Milpa\Live\Schema\SchemaFormParser | |
| $binder | Milpa\Live\Schema\FormBinder |
SchemaForm::fromSchema()
public function fromSchema(string $id, array $inputSchema): Milpa\Live\Schema\FormDefinitionParses an input schema into a FormDefinition (delegates to SchemaFormParser).
Parameters
| Name | Type | Description |
|---|---|---|
| $id | string | |
| $inputSchema | array<string, mixed> |
SchemaForm::bind()
public function bind(Milpa\Live\Schema\FormDefinition $definition, array $rawValues): Milpa\Live\Schema\FormSubmissionBinds raw values against a definition into a FormSubmission (delegates to FormBinder).
Parameters
| Name | Type | Description |
|---|---|---|
| $definition | Milpa\Live\Schema\FormDefinition | |
| $rawValues | array<string, mixed> |