Copied!

Segment

Segment.php : 14
Final
Extends ValueObject

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

publicSOURCE_COHESIVO

Segment.php : 16
public string SOURCE_COHESIVO = 'cohesivo'

Properties

protected $group

Segment.php : 22
protected SegmentGroup $group

protected $id

Segment.php : 19
protected int $id

protected $identifier

Segment.php : 20
protected string $identifier

protected $lastUpdatedBy

Segment.php : 24
protected string|null $lastUpdatedBy = null

protected $name

Segment.php : 21
protected string $name

protected $source

Segment.php : 23
protected string $source = self::SOURCE_COHESIVO

protected $updatedAt

Segment.php : 25
protected DateTimeImmutable|null $updatedAt = null

Methods

public__construct()

Segment.php : 18

Construct object optionally with a set of properties.

public __construct(int $id, string $identifier, string $name, SegmentGroup $group[, string $source = \self::SOURCE_COHESIVO ][, string|null $lastUpdatedBy = null ][, DateTimeImmutable|null $updatedAt = null ])

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 -

publicgetId()

Segment.php : 30
public getId() : int

Return values

int

publicgetIdentifier()

Segment.php : 35
public getIdentifier() : string

Return values

string

publicgetLastUpdatedBy()

Segment.php : 55
public getLastUpdatedBy() : string|null

Return values

string|null

publicgetName()

Segment.php : 40
public getName() : string

Return values

string

publicgetSegmentGroup()

Segment.php : 45
public getSegmentGroup() : SegmentGroup

Return values

SegmentGroup

publicgetSource()

Segment.php : 50
public getSource() : string

Return values

string

publicgetUpdatedAt()

Segment.php : 60
public getUpdatedAt() : DateTimeImmutable|null

Return values

DateTimeImmutable|null

protectedgetProperties()

ValueObject.php : 52

Returns list of available properties' names.

protected getProperties([array<int, string> $dynamicProperties = [] ]) : array<int, string>

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]