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¶
SOURCE_COHESIVO ¶
Segment.php
:
16
|
|
|
Properties¶
$group
¶
Segment.php
:
22
|
|
|
$id
¶
Segment.php
:
19
|
|
|
$identifier
¶
Segment.php
:
20
|
|
|
$lastUpdatedBy
¶
Segment.php
:
24
|
|
|
$name
¶
Segment.php
:
21
|
|
|
$source
¶
Segment.php
:
23
|
|
|
$updatedAt
¶
Segment.php
:
25
|
|
|
Methods¶
__construct()
¶
Segment.php
:
18
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 |
|---|---|---|---|
| $id | int | - | - |
| $identifier | string | - | - |
| $name | string | - | - |
| $group | SegmentGroup | - | - |
| $source | string | Segment::SOURCE_COHESIVO | - |
| $lastUpdatedBy | string|null | null | - |
| $updatedAt | DateTimeImmutable|null | null | - |
getId()
¶
Segment.php
:
30
|
|
|
Return values
int
getIdentifier()
¶
Segment.php
:
35
|
|
|
Return values
string
getLastUpdatedBy()
¶
Segment.php
:
55
|
|
|
Return values
string|null
getName()
¶
Segment.php
:
40
|
|
|
Return values
string
getSegmentGroup()
¶
Segment.php
:
45
|
|
|
Return values
getSource()
¶
Segment.php
:
50
|
|
|
Return values
string
getUpdatedAt()
¶
Segment.php
:
60
|
|
|
Return values
DateTimeImmutable|null
getProperties()
¶
ValueObject.php
:
52
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>
Attributes
- #[Ignore]