2017 © Pedro Peláez
 

library php-dynamic-proxy

A dynamic proxy generator for PHP

image

letscodehu/php-dynamic-proxy

A dynamic proxy generator for PHP

  • Saturday, February 18, 2017
  • by letscodehu
  • Repository
  • 1 Watchers
  • 0 Stars
  • 41 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 8 Versions
  • 3 % Grown

The README.md

A dynamic proxy generator for PHP., (*1)

Based on Javassist ProxyFactory, (*2)

Usage

Config::set(["CACHE_DIRECTORY" => "/tmp/php-dynamic-proxy"]);

$class = new ReflectionClass("Class");
$methodOverrides = [
    new MethodHook {
        public function supports(ReflectionMethod $method) {
            return $method->getName() == "test";
        }

        public function invoke($proxy, ReflectionMethod $method, array $args) {
            // before original method

            $returnValue = $method->invokeArgs($proxy, $args);

            // after original method

            return $returnValue;
        }
    }
];

$proxy = ProxyFactory::create($class, $methodOverrides);

The Versions

18/02 2017

dev-master

9999999-dev http://github.com/guymers/php-dynamic-proxy

A dynamic proxy generator for PHP

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

18/02 2017

1.0.5

1.0.5.0 http://github.com/guymers/php-dynamic-proxy

A dynamic proxy generator for PHP

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

18/02 2017

1.0.4

1.0.4.0 http://github.com/guymers/php-dynamic-proxy

A dynamic proxy generator for PHP

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

02/04 2013

1.0.3

1.0.3.0 http://github.com/guymers/php-dynamic-proxy

A dynamic proxy generator for PHP

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

02/04 2013

1.0.2

1.0.2.0 http://github.com/guymers/php-dynamic-proxy

A dynamic proxy generator for PHP

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

01/04 2013

1.0.1

1.0.1.0 http://github.com/guymers/php-dynamic-proxy

A dynamic proxy generator for PHP

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

01/04 2013

1.0

1.0.0.0 http://github.com/guymers/php-dynamic-proxy

A dynamic proxy generator for PHP

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

30/03 2013

0.1

0.1.0.0 http://github.com/guymers/php-dynamic-proxy

A dynamic proxy generator for PHP

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires