Class Schema
Contains the schema information for Form instances.
Property Summary
- 
        $_fieldDefaults protectedarray<string, mixed>The default values for fields. 
- 
        $_fields protectedarray<string, array<string, mixed>>The fields in this schema. 
Method Summary
- 
          __debugInfo() publicGet the printable version of this object 
- 
          addField() publicAdds a field to the schema. 
- 
          addFields() publicAdd multiple fields to the schema. 
- 
          field() publicGet the attributes for a given field. 
- 
          fieldType() publicGet the type of the named field. 
- 
          fields() publicGet the list of fields in the schema. 
- 
          removeField() publicRemoves a field to the schema. 
Method Detail
__debugInfo() ¶ public
__debugInfo(): array<string, mixed>Get the printable version of this object
Returns
array<string, mixed>addField() ¶ public
addField(string $name, array<string, mixed>|string $attrs): $thisAdds a field to the schema.
Parameters
- 
                string$name
- The field name. 
- 
                array<string, mixed>|string$attrs
- The attributes for the field, or the type as a string. 
Returns
$thisaddFields() ¶ public
addFields(array<string, array<string, mixed>|string> $fields): $thisAdd multiple fields to the schema.
Parameters
- 
                array<string, array<string, mixed>|string>$fields
- The fields to add. 
Returns
$thisfield() ¶ public
field(string $name): array<string, mixed>|nullGet the attributes for a given field.
Parameters
- 
                string$name
- The field name. 
Returns
array<string, mixed>|nullThe attributes for a field, or null.
fieldType() ¶ public
fieldType(string $name): string|nullGet the type of the named field.
Parameters
- 
                string$name
- The name of the field. 
Returns
string|nullEither the field type or null if the field does not exist.
fields() ¶ public
fields(): array<string>Get the list of fields in the schema.
Returns
array<string>The list of field names.
removeField() ¶ public
removeField(string $name): $thisRemoves a field to the schema.
Parameters
- 
                string$name
- The field to remove. 
Returns
$this