Copied!

CartCreateStruct

CartCreateStruct.php : 16
Extends ValueObject

The base class for all value objects and structs.

Supports readonly properties by marking them as protected. In this case they will only be writable using constructor, and need to be documented using property-read <$var> annotation in class doc in addition to inline property doc. Writable properties must be public and must be documented inline.

Methods

public__construct()

CartCreateStruct.php : 27

Construct object optionally with a set of properties.

public __construct(string $name, CurrencyInterface $currency[, User|null $owner = null ])

Readonly properties values must be set using $properties as they are not writable anymore after object has been created.

Parameters

Name Type Default value Description
$name string - -
$currency CurrencyInterface - -
$owner User|null null -

publicgetContext()

CartCreateStruct.php : 72
public getContext() : MapInterface<string, mixed>|null

Return values

MapInterface<string, mixed>|null

publicgetCurrency()

CartCreateStruct.php : 49
public getCurrency() : CurrencyInterface

Return values

CurrencyInterface

publicgetName()

CartCreateStruct.php : 39
public getName() : string

Return values

string

publicgetOwner()

CartCreateStruct.php : 59
public getOwner() : User|null

Return values

User|null

publicsetContext()

CartCreateStruct.php : 80
public setContext(MapInterface<string, mixed>|null $context) : void

Parameters

Name Type Default value Description
$context MapInterface<string, mixed>|null - -

publicsetCurrency()

CartCreateStruct.php : 54
public setCurrency(CurrencyInterface $currency) : void

Parameters

Name Type Default value Description
$currency CurrencyInterface - -

publicsetName()

CartCreateStruct.php : 44
public setName(string $name) : void

Parameters

Name Type Default value Description
$name string - -

publicsetOwner()

CartCreateStruct.php : 64
public setOwner(User|null $owner) : void

Parameters

Name Type Default value Description
$owner User|null - -

protectedgetProperties()

ValueObject.php : 50

Function where list of properties are returned.

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

Used by attributes(), override to add dynamic properties

Parameters

Name Type Default value Description
$dynamicProperties array<string|int, mixed> []

Additional dynamic properties exposed on the object

Return values

array<string|int, mixed>