polass/exposer

Exposer exposes hidden properties and methods

v1.0.1 2017-06-13 14:56 UTC

This package is not auto-updated.

Last update: 2024-12-22 04:17:03 UTC


README

The Exposer exposes hidden properties and methods.

Usage

<?php

class Secrecy {
    private $property = 'hidden';

    private function method($argument) {
        return 'called';
    }
}

$exposer = expose(new Secrecy);

echo $exposer->property;  // `hidden`

$exposer->property = 'exposed';
echo $exposer->property;  // `exposed`

echo $exposer->method('argument');  // `called`