thapp / propreader
easy retrieve private properties
Installs: 5
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 0
Open Issues: 0
Type:package
Requires
- php: >=5.6
Requires (Dev)
- phpunit/phpunit: ^5.2
This package is not auto-updated.
Last update: 2024-12-21 20:30:27 UTC
README
a quick (and dirty) implementation based on @ocramius blog post on fast object to array conversion.
Installation
> composer require thapp/propreader
Usage
<?php class Foo { private $foo = 'bar'; private $bar = 'baz'; private $int = 0; } $reader = new \Thapp\PropReader\PropReader; $props = $reader->read(new Foo, 'foo', 'bar'); // => ['foo' => 'bar', 'bar' => 'baz']