+0
Daily
4,935
stars
190
forks
42
watchers
515
prs
290
issues
70
releases
README
Proxy Manager A message to Russian 🇷🇺 people If you currently live in Russia, please read this message. Purpose This library aims to provide abstraction for generating various kinds of proxy classes. !ProxyManager Documentation You can learn about the proxy pattern and how to use the ProxyManager in the docs. ocramius/proxy-manager for enterprise Available as part of the Tidelift Subscription. The maintainer of ocramius/proxy-manager and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. Learn more.. You can also contact the maintainer at [email protected] for looking into issues related to this package in your private projects. Installation The suggested installation method is via composer: 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 return true; // report success } ); $proxy-doFoo(); See the documentation for more supported proxy types and examples.
Top issues
#162Better support for internal PHP classes default parameters28 comments · 2014-04-14#371FileLocator::getProxyFileName fails PSR-0/PSR-4 autoloading when no classmap is defined20 comments · 2017-05-04#472ValueHolder proxy for class with accessing to private property within final method15 comments · 2019-07-05#754Setting property default value to enum points to invalid namespace12 comments · 2022-03-21#468[From PHP-DI] `__destruct` magic method being called before lazy Proxy creates value #66910 comments · 2019-06-14#778Proxies for __set/__unset need special handling if the parent implementation return type is explicitly declared as void9 comments · 2023-01-12#49Move internal implementation from Zend\Code to PHP-Parser9 comments · 2013-06-04#737Promoted readonly properties are not respected7 comments · 2022-02-25
Latest release
2.14.1 2.14.1 2022-03-05Release Notes for 2.14.1 2.14.1 - Total issues resolved: 0 - Total pull requests resolved: 1 - Total contributors: 1 enhancement - 752: Merge release 2.13.1 into 2.14.x thanks to @github-actions[bot]