Download the PHP package alexrili/vephar without Composer
On this page you can find all versions of the php package alexrili/vephar. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download alexrili/vephar
More information about alexrili/vephar
Files in alexrili/vephar
Package vephar
Short Description Small abstraction of api requests and transform responses in collections
License MIT
Homepage https://github.com/alexrili/vephar
Informations about the package vephar
vephar
vephar vephar is a simple library that transform you arrays in collections/resources(objects).
Install
Via Composer
Start vephar
Vephar provides you a simple method called response_to_object
out of the box.
OR you can call like this
OR by calling static method called toObject
Usage (Automatic way)
The vephar will transform your arrays(and the nested as well) in collections of resources automatically. Every index of your array will be a new attribute of your new collection/resource(object).
Usage (Custom way)
The vephar also allows you to assign your own collection and resource contracts to it.
Important:When you use your own contracts you need to explicitly say to if vephar should or not make somthings like going deeper or not into your nested arrays or change the pattern of you attribute names to camelCase etc.
In this case the response will be your own custom classes
Change log
Please see CHANGELOG for more information on what has changed recently.
Testing
Contributing
Please see CODE_OF_CONDUCT for details.
Security
If you discover any security related issues, please email alexrili instead of using the issue tracker.
Credits
- Alex Ribeiro
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of vephar with dependencies
ext-json Version *