Linux SRV-16 6.18.44-paas #1 SMP PREEMPT_DYNAMIC Thu Aug 13 10:08:12 UTC 2026 x86_64
/
srv
/
data
/
web
/
vhosts
/
www.humitest.fr
/
htdocs
/
vendor
/
ocramius
/
proxy-manager
/
/srv/data/web/vhosts/www.humitest.fr/htdocs/vendor/ocramius/proxy-manager/README.md
# Proxy Manager This library aims at providing abstraction for generating various kinds of [proxy classes](http://ocramius.github.io/presentations/proxy-pattern-in-php/).  [](https://travis-ci.org/Ocramius/ProxyManager) [](https://scrutinizer-ci.com/g/Ocramius/ProxyManager/) [](https://scrutinizer-ci.com/g/Ocramius/ProxyManager/) [](https://insight.sensiolabs.com/projects/69fe5f97-b1c8-4ddd-93ce-900b8b788cf2) [](https://www.versioneye.com/package/php--ocramius--proxy-manager) [](https://www.versioneye.com/php/ocramius:proxy-manager/references) [](http://hhvm.h4cc.de/package/ocramius/proxy-manager) [](https://packagist.org/packages/ocramius/proxy-manager) [](https://packagist.org/packages/ocramius/proxy-manager) [](https://packagist.org/packages/ocramius/proxy-manager) ## Documentation You can learn about the proxy pattern and how to use the **ProxyManager** in the [docs](docs), which are also [compiled to HTML](http://ocramius.github.io/ProxyManager). ## Help/Support [](https://gitter.im/Ocramius/ProxyManager?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) ## Installation The suggested installation method is via [composer](https://getcomposer.org/): ```sh php composer.phar require ocramius/proxy-manager ``` ## Proxy example Here's how you build a lazy loadable object with ProxyManager using a *Virtual Proxy* ```php $factory = new \ProxyManager\Factory\LazyLoadingValueHolderFactory(); $proxy = $factory->createProxy( \MyApp\HeavyComplexObject::class, function (& $wrappedObject, $proxy, $method, $parameters, & $initializer) { $wrappedObject = new \MyApp\HeavyComplexObject(); // instantiation logic here $initializer = null; // turning off further lazy initialization } ); $proxy->doFoo(); ``` See the [online documentation](http://ocramius.github.io/ProxyManager) for more supported proxy types and examples.