ifcastle / type-definitions
Library for defining data types at the business logic layer. Data hydration and serialization based on type definitions.
Installs: 200
Dependents: 2
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/ifcastle/type-definitions
Requires
- ifcastle/exceptions: ^5.2
Requires (Dev)
- ifcastle/codestyle: ^0.1.7
- phpunit/phpunit: ^11.2
README
A metadata library for describing the types of procedures, services, and objects.
Why is this needed?
Information about data types and method prototypes can be used for code generation,
forming DataTransferObjects, and remote calls.
This library provides an independent infrastructure for forming metadata
about data types that is not tied to a specific implementation.
Features
- Classes for describing data types
- Forming metadata through PHP Reflection and attributes.
- Serialization and deserialization of data into a
JSON-like structure (JSON-array). ValueContainerpattern: a container for storing values with a type descriptor.- A PHP code generator for serialization, validation, and deserialization for better performance.
Installation
composer require ifcastle/type-definitions
Example
<?php declare(strict_types=1); require_once __DIR__ . '/vendor/autoload.php'; // TODO: Add example