Since: 2025-02-04

class SetGood implements Stringable (View source)

This class is a value object for SetGood object.

Constants

DELIMITER

The delimiter for multiple good code

DELIMITER_COUNT

The delimiter for good count

Methods

static SetGood
of(string $code)

Create SetGood instance from code.

static SetGood
ofArray(array $setCodes)

Create SetGood instance from key-value set code array.

string
code()

Gets a code property.

array
goods()

Gets a goods property.

string
__toString()

Gets a string representation of the object.

Details

static SetGood of(string $code)

Create SetGood instance from code.

Parameters

string $code

The set code string

Return Value

SetGood

The method returns SetGood instance with the SetCode string

static SetGood ofArray(array $setCodes)

Create SetGood instance from key-value set code array.

Parameters

array $setCodes

key-value set code array

Return Value

SetGood

The method returns SetGood instance with the SetCode string

Examples

SetGood::ofArray(['7369'=>4,'4235'=>6]) => SET7369x4zz42335x6

string code()

Gets a code property.

Return Value

string

The method returns code property

array goods()

Gets a goods property.

Return Value

array

The method returns goods property

string __toString()

Gets a string representation of the object.

Return Value

string