sebastian/peek-and-poke
Composer 安装命令:
composer require sebastian/peek-and-poke
包简介
Proxy for accessing non-public attributes and methods of an object
README 文档
README
Peek and Poke Proxy
Proxy for accessing non-public attributes and methods of an object.
Installation
To add Peek and Poke Proxy as a local, per-project dependency to your project, simply add a dependency on sebastian/peek-and-poke to your project's composer.json file. Here is a minimal example of a composer.json file that just defines a dependency on Peek and Poke Proxy 1.0:
{
"require": {
"sebastian/peek-and-poke": "1.0.*"
}
}
Usage
class Foo { private $bar = 'baz'; private function notPublic() { print __METHOD__ . PHP_EOL; } } $foo = new Foo; $proxy = new SebastianBergmann\PeekAndPoke\Proxy($foo); print $proxy->bar . PHP_EOL; $proxy->notPublic();
baz
Foo::notPublic
统计信息
- 总下载量: 153.4k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 34
- 点击次数: 1
- 依赖项目数: 6
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2015-06-21