Download the PHP package ag84ark/object-convertor without Composer
On this page you can find all versions of the php package ag84ark/object-convertor. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ag84ark/object-convertor
More information about ag84ark/object-convertor
Files in ag84ark/object-convertor
Package object-convertor
Short Description Array to object convert
License MIT
Homepage https://github.com/ag84ark/object-convertor
Informations about the package object-convertor
Object Convertor (works with Laravel)
This package helps too easily transform an array to a predefined class with setters and getters
For understanding better the use of this package please look at the Usage
as well as in the tests folder where you can understand better how to use this class.
I created this package as it helps me a lot when I am working with JSON information in the DataBase that is structured into classes and subclasses.
Really hope that would be of some help to others as well!
Installation
You can install the package via composer:
Usage
When creating classes for Laravel applications try to extend the BaseModelApi as helps you with a lot of things.
Sample class
Via constructor ( needs ObjectConstructorTrait )
From array ( needs ObjectConstructorTrait )
Via ObjectConvertor to class that extends BaseModelApi
Via ObjectConvertor to normal class
Basic class example
Testing
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
- George Cojocaru
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
Laravel Package Boilerplate
This package was generated using the Laravel Package Boilerplate.