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

dev-master 2016-02-10 13:04 UTC

This package is not auto-updated.

Last update: 2024-04-27 17:20:17 UTC


README

Author Source Code Software License

Build Status Code Coverage HHVM

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']