Speca is a flexible and powerful implementation of data classes designed for seamless interaction with external systems (such as API DTOs) and efficient data flow management across different domains. Inspired by domain-driven design (DDD) principles, Speca provides a structured and adaptable approach to handling data transformations.
- Automatic property population – No more manual assignments. Speca maps input arrays directly to object properties.
- Attribute-based parsing and serialization – Fine-tune how data is handled using PHP attributes.
- Lazy properties – Optimize performance by loading data only when needed.
- No external dependencies – Speca is built purely on PHP's native capabilities, ensuring compatibility and minimal footprint.
With Speca, data structures become more than just objects—they represent specifications, defining how data is parsed, transformed, and serialized across your application.
Install Speca via Composer:
composer require looqey/speca
For a detailed guide on using this library, visit the 👉 official documentation
We welcome contributions! If you have ideas, improvements, or find an issue, feel free to open an issue or submit a pull request. Your feedback and contributions help make Speca even better! 🚀
Let's shape the future of PHP data handling together! 💡🚀