library class-exposer
Allows access to a classes private methods and properties
exposer/class-exposer
Allows access to a classes private methods and properties
- Saturday, August 22, 2015
- by craigh411
- Repository
- 1 Watchers
- 1 Stars
- 13 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 3 Versions
- 0 % Grown
Access a PHP Classes Private & Protected Methods & Properties
Why?
Useful for testing private and protected methods in a class., (*1)
Installation
You can simply download or copy & paste the ClassExposer.php class
and include it in your own php files., (*2)
Composer
Also available via Composer:, (*3)
$ composer require exposer/class-exposer, (*4)
Make sure you have minimum-stability set to 'dev' in your
composer.json file., (*5)
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;
dev-master
9999999-dev
Allows access to a classes private methods and properties
Sources
Download
MIT
The Development Requires
by
Craig Humphreys
v1.0.0
1.0.0.0
Allows access to a classes private methods and properties
Sources
Download
MIT
The Development Requires
by
Craig Humphreys
1.0.0-alpha
1.0.0.0-alpha
Allows access to a classes private methods and properties
Sources
Download
MIT
The Development Requires
by
Craig Humphreys