Skip to content

Generate class with PhpDto\ToArray trait and Arrayable interface #14

Open
@hakobyansen

Description

@hakobyansen

There should be a boolean arrayable flag in the pattern (schema), and if it's true, then ToArray trait should be used in the generated class.

Get rid of DtoSerialize trait in the generated class, because it's already used in the ToArray trait.

Implement PhpDto\Arrayable interface that contains just one method public function toArray(): array.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions