thapp/propreader

轻松检索私有属性

安装: 5

依赖: 0

建议者: 0

安全: 0

星标: 0

关注者: 3

分支: 0

开放问题: 0

类型:package

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

This package is not auto-updated.

Last update: 2024-09-14 19:03:58 UTC


README

Author Source Code Software License

Build Status Code Coverage HHVM

基于@ocramius快速对象到数组转换博客文章的快速(且简陋)实现。

安装

> composer require thapp/propreader

用法

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