Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

sebastianbergmann/peek-and-poke

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

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

About

Proxy for accessing non-public attributes and methods of an object

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages