The base class for all value objects and structs.
Supports read-only properties by marking them as protected.
In this case they will only be writable using constructor, and need to be documented
using @property-read <type> <$var>
annotation in class doc in addition to inline property doc.
Writable properties must be public and must be documented inline.
Constants¶
INF ¶
Range.php
:
16
|
|
Methods¶
__construct()
¶
Range.php
:
34
Construct object optionally with a set of properties.
|
|
Readonly properties values must be set using $properties
as they aren't writable anymore
after object has been created.
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$from | mixed | - | - |
$to | mixed | - | - |
$label | string|null | null | - |
__toString()
¶
Range.php
:
63
|
|
Return values
string
equalsTo()
¶
Range.php
:
81
|
|
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$value | Range | - | - |
Return values
bool
getFrom()
¶
Range.php
:
43
|
|
getLabel()
¶
Range.php
:
53
|
|
Return values
string|null
getTo()
¶
Range.php
:
48
|
|
ofDateTime()
¶
Range.php
:
109
|
|
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$from | DateTimeInterface|null | - | - |
$to | DateTimeInterface|null | - | - |
Return values
self
ofFloat()
¶
Range.php
:
104
|
|
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$from | float|null | - | - |
$to | float|null | - | - |
Return values
self
ofInt()
¶
Range.php
:
99
|
|
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$from | int|null | - | - |
$to | int|null | - | - |
Return values
self
setLabel()
¶
Range.php
:
58
|
|
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$label | string|null | - | - |
getProperties()
¶
ValueObject.php
:
54
Returns list of available properties' names.
|
|
Override to add dynamic properties.
Parameters
Name | Type | Default value | Description |
---|---|---|---|
$dynamicProperties | array<int, string> | [] |
Additional dynamic properties exposed on the object |
Return values
array<int, string>