Copied!

Range

Range.php : 17
Final
Extends ValueObject

The base class for all value objects and structs.

Constants

publicINF

Range.php : 19
public mixed INF = null

Methods

public__construct()

Range.php : 41

Construct object optionally with a set of properties.

public __construct(mixed $from, mixed $to[, string|null $label = null ])

Parameters

Name Type Default value Description
$from mixed - -
$to mixed - -
$label string|null null -

public__toString()

Range.php : 76
public __toString() : string

Return values

string

publicequalsTo()

Range.php : 99

Check if the range is equal to another range.

public equalsTo(Range $value) : bool

Parameters

Name Type Default value Description
$value Range - -

Return values

bool

publicgetFrom()

Range.php : 53
public getFrom() : mixed

publicgetLabel()

Range.php : 66
public getLabel() : string|null

Return values

string|null

publicgetTo()

Range.php : 61
public getTo() : mixed

publicofDateTime()

Range.php : 151

Creates a range of dates.

public static ofDateTime(DateTimeInterface|null $from, DateTimeInterface|null $to) : self

Parameters

Name Type Default value Description
$from DateTimeInterface|null - -
$to DateTimeInterface|null - -

Return values

self

publicofFloat()

Range.php : 141

Creates a range of floats.

public static ofFloat(float|null $from, float|null $to) : self

Parameters

Name Type Default value Description
$from float|null - -
$to float|null - -

Return values

self

publicofInt()

Range.php : 131

Creates a range of integers.

public static ofInt(int|null $from, int|null $to) : self

Parameters

Name Type Default value Description
$from int|null - -
$to int|null - -

Return values

self

publicsetLabel()

Range.php : 71
public setLabel(string|null $label) : void

Parameters

Name Type Default value Description
$label string|null - -

protectedgetProperties()

ValueObject.php : 53

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]