Copied!

Range

Range.php : 14
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

publicINF

Range.php : 16
public mixed INF = null

Methods

public__construct()

Range.php : 34

Construct object optionally with a set of properties.

public __construct(mixed $from, mixed $to[, string|null $label = 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
$from mixed - -
$to mixed - -
$label string|null null -

public__toString()

Range.php : 63
public __toString() : string

Return values

string

publicequalsTo()

Range.php : 81
public equalsTo(Range $value) : bool

Parameters

Name Type Default value Description
$value Range - -

Return values

bool

publicgetFrom()

Range.php : 43
public getFrom() : mixed

publicgetLabel()

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

Return values

string|null

publicgetTo()

Range.php : 48
public getTo() : mixed

publicofDateTime()

Range.php : 109
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 : 104
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 : 99
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 : 58
public setLabel(string|null $label) : void

Parameters

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

protectedgetProperties()

ValueObject.php : 54

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>

Tags
Serializerignore

()