Download the PHP package meraki/schema-html without Composer
On this page you can find all versions of the php package meraki/schema-html. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download meraki/schema-html
More information about meraki/schema-html
Files in meraki/schema-html
Package schema-html
Short Description Render a meraki/schema as an HTML form.
License MIT
Informations about the package schema-html
meraki/schema-html
Render a meraki/schema as an HTML form.
Keeps HTML/form-rendering concerns out of the core schema domain. Reads only
meraki/schema's public API.
Usage
Render after validation to surface inline error messages:
Form options
FormOptions is a fluent builder producing the array the renderer consumes:
postTo($url)/getFrom($url)— form method + action.pickField($name)→FieldOptions:label(),renderAs(Renderer),renderAsDropdown(),renderAsTextarea(),readonly(),disabled(),hidden(),withOption($value, $label)(Enum), andpickField()for composite sub-fields.
Renderer enumerates the allowed input renderers and validates them per field
type via Renderer::validFor($field).
Elements are built with a small internal Element class that maps native PHP
attribute values to HTML — true → bare attribute, false/null → omitted,
scalars → escaped name="value".
Request input
Input normalizes request data so it can be fed straight back to the schema,
smoothing over PHP's quirks:
- a present-but-unfilled field arrives as
''→ normalized tonull(presence is still recoverable viahas()); - a checked checkbox submits
'on'→ normalized totrue; - uploaded files are merged in by input name as
{ name, type, size }metadata (ready for theFilefield); - nested names like
price[amount]are accessible via chainedget(),ArrayAccess, or object access.
Input is read-only.
Local development
composer.json links the sibling ../schema checkout via a Composer path
repository.