StringEnumModel
extends AbstractModel
in package
implements
IScalarModel
FinalYes
Table of Contents
Interfaces
- IScalarModel
- Empty interface to easily check for a scalar type model.
Properties
- $cases : array<string|int, mixed>
Methods
- __construct() : mixed
- getNotNullConstraint() : INotNullConstraint|null
- isNullable() : bool
- Shorter way to check whether the content can be null.
Properties
$cases read-only
public
array<string|int, mixed>
$cases
Methods
__construct()
public
__construct(array<int, BackedEnum> $cases[, bool $isNullable = false ]) : mixed
Parameters
- $cases : array<int, BackedEnum>
-
Set of allowed string-backed enum cases.
- $isNullable : bool = false
Tags
getNotNullConstraint()
public
getNotNullConstraint() : INotNullConstraint|null
Attributes
- #[Override]
Return values
INotNullConstraint|null —Whether the content is necessarily specified or can be left omitted.
isNullable()
Shorter way to check whether the content can be null.
public
isNullable() : bool
Attributes
- #[Override]