ArrayType
class ArrayType extends Type
Properties
| protected bool|null | $required | Whether the type is required. |
from Type |
| protected string|null | $title | The type's title. |
from Type |
| protected string|null | $description | The type's description. |
from Type |
| protected mixed | $default | The default value for the type. |
from Type |
| protected null|array<int, mixed> | $enum | The set of allowed values for the type. |
from Type |
| protected bool|null | $nullable | Indicates if the type is nullable. |
from Type |
| protected int|null | $minItems | The minimum number of items (inclusive). |
|
| protected int|null | $maxItems | The maximum number of items (inclusive). |
|
| protected Type|null | $items | The schema of the items contained in the array. |
Methods
Dynamically pass static methods to the schema instance.
No description
Details
in
JsonSchema at line 23
static Type
__callStatic(string $name, array $arguments)
Dynamically pass static methods to the schema instance.
in
JsonSchema at line 18
static ObjectType
object(Closure|array<string $, Type> $properties = '[]')
No description
in
JsonSchema at line 18
static IntegerType
integer()
No description
in
JsonSchema at line 18
static NumberType
number()
No description
in
JsonSchema at line 18
static StringType
string()
No description
in
JsonSchema at line 18
static BooleanType
boolean()
No description
in
JsonSchema at line 18
static ArrayType
array()
No description
in
Type at line 97
Type
enum(array|string $values)
Restrict the value to one of the provided enumerated values.
in
Type at line 118
array
toArray()
Convert the type to an array.
in
Type at line 126
string
toString()
Convert the type to its string representation.
in
Type at line 134
string
__toString()
Convert the type to its string representation.
at line 27
ArrayType
min(int $value)
Set the minimum number of items (inclusive).
at line 37
ArrayType
max(int $value)
Set the maximum number of items (inclusive).
at line 59
ArrayType
default(array $value)
Set the type's default value.