exposer/class-exposer
最新稳定版本:v1.0.0
Composer 安装命令:
composer require exposer/class-exposer
包简介
Allows access to a classes private methods and properties
README 文档
README
Why?
Useful for testing private and protected methods in a class.
##Installation
You can simply download or copy & paste the ClassExposer.php class and include it in your own php files.
Composer
Also available via Composer:
$ composer require exposer/class-exposer
Make sure you have minimum-stability set to 'dev' in your composer.json file.
Usage
// Include the ClassExposer Class
require_once 'ClassExposer.php';
// Pass an object instance in to the ClassExposer
$myExposedClass = new Exposer\ClassExposer(new MyClass());
// Access all methods and properties as normal
$myExposedClass->myPrivateMethod();
$myExposedClass->myPrivateProperty = "foo";
echo $myExposedClass->myPrivateProperty;
统计信息
- 总下载量: 24
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-08-19