NumberType
class NumberType extends Type (View source)
Properties
protected | $required | Whether the type is required. |
from Type |
protected | $title | The type's title. |
from Type |
protected | $description | The type's description. |
from Type |
protected | $default | The default value for the type. |
from Type |
protected array<int,mixed>|null | $enum | The set of allowed values for the type. |
from Type |
protected | $minimum | The minimum value (inclusive). |
|
protected | $maximum | The maximum value (inclusive). |
Methods
Dynamically pass static methods to the schema instance.
Set the minimum value (inclusive).
Set the maximum value (inclusive).
Set the type's default value.
Details
static Type
__callStatic(string $name, mixed $arguments)
Dynamically pass static methods to the schema instance.
in
Type at line 40
Type
required()
Indicate that the type is required.
in
Type at line 50
Type
title(string $value)
Set the type's title.
in
Type at line 60
Type
description(string $value)
Set the type's description.
in
Type at line 72
Type
enum(array $values)
Restrict the value to one of the provided enumerated values.
in
Type at line 85
array
toArray()
Convert the type to an array.
in
Type at line 93
string
toString()
Convert the type to its string representation.
in
Type at line 101
string
__toString()
Convert the type to its string representation.
NumberType
min(int|float $value)
Set the minimum value (inclusive).
NumberType
max(int|float $value)
Set the maximum value (inclusive).
NumberType
default(int|float $value)
Set the type's default value.