Property
in package
Table of Contents
Properties
- $errors : array<string|int, mixed>
- $name : string
- $parent : ICompound
- $required : bool
- $type : string
- $typeValidators : array<string|int, mixed>
- $validators : Collection
- $value : mixed
Methods
- __construct() : mixed
- getAsJson() : string
- getName() : string
- getParent() : ICompound
- getType() : string
- getValue() : mixed
- isRequired() : bool
- setEnum() : Property
- Set allowed values for enum validation.
- setLengthRange() : $this
- setName() : Property
- setParent() : Property
- setPattern() : Property
- setRequired() : Property
- setType() : Property
- setValue() : Property
- setValueRange() : $this
- validate() : void
- getArrayAsJson() : string
- getDtoAsJson() : string
- validateRequired() : bool
Properties
$errors
private
array<string|int, mixed>
$errors
$name
private
string
$name
$parent
private
ICompound
$parent
$required
private
bool
$required
$type
private
string
$type
$typeValidators
private
array<string|int, mixed>
$typeValidators
$validators
private
Collection
$validators
$value
private
mixed
$value
= null
Methods
__construct()
public
__construct() : mixed
getAsJson()
public
getAsJson() : string
Tags
Return values
stringgetName()
public
getName() : string
Return values
stringgetParent()
public
getParent() : ICompound
Return values
ICompoundgetType()
public
getType() : string
Return values
stringgetValue()
public
getValue() : mixed
isRequired()
public
isRequired() : bool
Return values
boolsetEnum()
Set allowed values for enum validation.
public
setEnum(array<string|int, mixed> $allowedValues[, bool $strict = true ]) : Property
Parameters
- $allowedValues : array<string|int, mixed>
-
Array of allowed values
- $strict : bool = true
-
Whether to use strict comparison (default: true)
Return values
PropertysetLengthRange()
public
setLengthRange(int $min, int $max) : $this
Parameters
- $min : int
- $max : int
Return values
$thissetName()
public
setName(string $name) : Property
Parameters
- $name : string
Return values
PropertysetParent()
public
setParent(ICompound $parent) : Property
Parameters
- $parent : ICompound
Return values
PropertysetPattern()
public
setPattern(string $pattern) : Property
Parameters
- $pattern : string
Return values
PropertysetRequired()
public
setRequired(bool $required) : Property
Parameters
- $required : bool
Return values
PropertysetType()
public
setType(string $type) : Property
Parameters
- $type : string
Tags
Return values
PropertysetValue()
public
setValue(mixed $value) : Property
Parameters
- $value : mixed
Return values
PropertysetValueRange()
public
setValueRange(mixed $min, mixed $max) : $this
Parameters
- $min : mixed
- $max : mixed
Return values
$thisvalidate()
public
validate() : void
Tags
getArrayAsJson()
protected
getArrayAsJson() : string
Tags
Return values
stringgetDtoAsJson()
protected
getDtoAsJson() : string
Return values
stringvalidateRequired()
private
validateRequired() : bool