2017 © Pedro Peláez
 

library peek-and-poke

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

image

sebastian/peek-and-poke

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

  • PHP
  • 9 Dependents
  • 0 Suggesters
  • 3 Forks
  • 1 Open issues
  • 1 Versions
  • 13 % Grown

The README.md

Build Status, (*1)

Peek and Poke Proxy

Proxy for accessing non-public attributes and methods of an object., (*2)

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:, (*3)

{
    "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

The Versions

06/08 2015

dev-master

9999999-dev https://www.github.com/sebastianbergmann/peek-and-poke

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

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.6.0

 

The Development Requires