PHPackages                             jarivas/php-popo-models - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. jarivas/php-popo-models

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

jarivas/php-popo-models
=======================

A simple and direct way of casting json objects to models

1.3(3mo ago)0211GPL-3.0-or-laterPHP

Since Aug 12Pushed 3mo agoCompare

[ Source](https://github.com/jarivas/php-popo-models)[ Packagist](https://packagist.org/packages/jarivas/php-popo-models)[ RSS](/packages/jarivas-php-popo-models/feed)WikiDiscussions main Synced yesterday

READMEChangelog (4)Dependencies (10)Versions (6)Used By (1)

PHP json casting
================

[](#php-json-casting)

- A easy solution to have decriptions of json objects POCO style, please check **tests** for examples
- The method **Object::collection** will convert an array of objects to an collection of PHP objects that extends from CastModels\\Model
- The objects that extends from CastModels\\Model has the method **toArray** so can be returned in a response directly
- composer require jarivas/php-popo-models

```
