baraja-core / serializer
Simple serializer any PHP type or structure to simple scalar array.
Installs: 27 884
Dependents: 1
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: ^8.0
Requires (Dev)
- baraja-core/ecommerce-standard: ^0.0
- baraja-core/localization: ^2.0
- nette/utils: ^3.2
- phpstan/extension-installer: ^1.1
- phpstan/phpstan: ^1.0
- phpstan/phpstan-deprecation-rules: ^1.0
- phpstan/phpstan-nette: ^1.0
- phpstan/phpstan-strict-rules: ^1.0
- roave/security-advisories: dev-master
- spaze/phpstan-disallowed-calls: ^2.0
- tracy/tracy: ^2.8
This package is auto-updated.
Last update: 2024-10-29 01:27:15 UTC
README
A simple serializer that creates a simple scalar array based on any PHP object or other data structure.
The serializer automatically handles backward and forward compatibility. Automatically handles security.
The output is ready to be sent via REST API.
How to use
class DTO { public function __construct( public string $name, ) { } } $serializer = \Baraja\Serializer\Serializer::get(); var_dump($serializer->serialize( new DTO(name: 'Jan'), ));