class GoodCodeParser

Good code can be parsed by the GoodCodeParser except option-good codes.

Methods

__construct(string $parse)

Constructor.

with(string $parser, array|null $goods = null)

Ready to use a fit parser.

array|string
get()

Return good code or good codes.

Details

at line 27
__construct(string $parse)

Constructor.

Parameters

string $parse

Good code to be parsed.

Examples

(new GoodCodeParser('set7369x4ZZ4235x6'))->with(SetGood::class)->get();
(new GoodCodeParser('com2'))->with(ComplexGood::class, [1=>'set1x3ZZ43x2', 2=>...])->get();
(new GoodCodeParser('gif1'))->with(ComplexGood::class, [1=>'set1x3ZZ43x2', 2=>...])->get();

at line 38
GoodCodeParser with(string $parser, array|null $goods = null)

Ready to use a fit parser.

Parameters

string $parser

The parser eg. SetGood::class, ComplexGood::class,...

array|null $goods

The good codes

Return Value

GoodCodeParser

at line 48
array|string get()

Return good code or good codes.

Return Value

array|string