Copied!

CartCreateStruct

CartCreateStruct.php : 16
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.

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 aren't 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 : 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

()