crashuxx/phproxy

Class proxy

Maintainers

👁 crashuxx

Package info

github.com/crashuxx/phproxy

pkg:composer/crashuxx/phproxy

Statistics

Installs: 6 009

Dependents: 0

Suggesters: 0

Stars: 2

Open Issues: 0

1.0 2014-11-25 19:09 UTC

Requires

None

Requires (Dev)

Suggests

None

Provides

None

Conflicts

None

Replaces

None

BSD-3-Clause, Apache-2.0 f9a2584698008ad28ddced1749b2275f5d4c49e4

  • Lukas Pająk <lupajak.woop@gmail.com>

proxyclass

This package is not auto-updated.

Last update: 2026-06-21 01:08:22 UTC


README

Class proxy for php based on java.lang.reflect.Proxy. This library is under Apache License 2.0.

👁 Build Status

PHP >= 5.5 HHVM >= 3.4.0

Usage:

use \Reflection\Proxy;

class MyInvocationHandler implements \Reflection\InvocationHandler
{
 /**
 * @param object $proxy
 * @param string $method
 * @param mixed[] $args
 * @return mixed
 */
 function invoke($proxy, $method, $args)
 {
 echo $method;
 return 'my return value';
 }
}

$proxy = Proxy::newProxyInstance(\stdClass::class, new MyInvocationHandler());
echo $proxy->CustomMethod();