This package allows to recast php objects to object of other class.
Run
composer require flexic/recaster
to install flexic/recaster
.
$recaster = new Flexic\Recaster\Recaster($inputObject);
$object = $recaster->toClass(TargetClass::class);
$recaster = new Flexic\Recaster\Recaster($inputObject);
$arrayOfObject = $recaster->toArray();
This package is licensed using the GNU License.
Please have a look at LICENSE.md.