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.
Methods
Construct object optionally with a set of properties.
|
|
public __construct(string $languageCode, string $name, string|null $description, string|null $label, string|null $labelDescription)
|
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 |
|
$languageCode
|
string
|
-
|
-
|
|
$name
|
string
|
-
|
-
|
|
$description
|
string|null
|
-
|
-
|
|
$label
|
string|null
|
-
|
-
|
|
$labelDescription
|
string|null
|
-
|
-
|
|
|
public getDescription() : string|null
|
Return values
string|null
|
|
public getLabel() : string|null
|
Return values
string|null
|
|
public getLabelDescription() : string|null
|
Return values
string|null
|
|
public getLanguageCode() : string
|
Return values
string
|
|
public getName() : string
|
Return values
string
|
|
public setDescription(string|null $description) : $this
|
Parameters
| Name |
Type |
Default value |
Description |
|
$description
|
string|null
|
-
|
-
|
Return values
$this
|
|
public setLabel(string|null $label) : $this
|
Parameters
| Name |
Type |
Default value |
Description |
|
$label
|
string|null
|
-
|
-
|
Return values
$this
|
|
public setLabelDescription(string|null $labelDescription) : $this
|
Parameters
| Name |
Type |
Default value |
Description |
|
$labelDescription
|
string|null
|
-
|
-
|
Return values
$this
|
|
public setLanguageCode(string $languageCode) : $this
|
Parameters
| Name |
Type |
Default value |
Description |
|
$languageCode
|
string
|
-
|
-
|
Return values
$this
|
|
public setName(string $name) : $this
|
Parameters
| Name |
Type |
Default value |
Description |
|
$name
|
string
|
-
|
-
|
Return values
$this
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>