flexic / recaster
Package to recast php objects.
1.0.2
2022-10-16 19:53 UTC
Requires
- php: ^8.1
Requires (Dev)
- ergebnis/php-cs-fixer-config: ^4.9.0
- phpstan/phpstan: ^1.8.7
- phpstan/phpstan-deprecation-rules: ^1.0.0
- phpstan/phpstan-strict-rules: ^1.4.4
README
This package allows to recast php objects to object of other class.
Installation
Run
composer require flexic/recaster
to install flexic/recaster
.
Cast to object of other class
$recaster = new Flexic\Recaster\Recaster($inputObject); $object = $recaster->toClass(TargetClass::class);
Cast to array
$recaster = new Flexic\Recaster\Recaster($inputObject); $arrayOfObject = $recaster->toArray();
License
This package is licensed using the GNU License.
Please have a look at LICENSE.md.