[ Index ] |
PHP Cross Reference of phpBB-3.2.11-deutsch |
[Summary view] [Print] [Text view]
1 # Proxy Manager 2 3 This library aims at providing abstraction for generating various kinds of [proxy classes](http://marco-pivetta.com/proxy-pattern-in-php/). 4 5  6 7 [](https://travis-ci.org/Ocramius/ProxyManager) 8 [](https://scrutinizer-ci.com/g/Ocramius/ProxyManager/) 9 [](https://scrutinizer-ci.com/g/Ocramius/ProxyManager/) 10 [](https://insight.sensiolabs.com/projects/69fe5f97-b1c8-4ddd-93ce-900b8b788cf2) 11 [](https://www.versioneye.com/package/php--ocramius--proxy-manager) 12 [](https://www.versioneye.com/php/ocramius:proxy-manager/references) 13 [](http://hhvm.h4cc.de/package/ocramius/proxy-manager) 14 15 [](https://packagist.org/packages/ocramius/proxy-manager) 16 [](https://packagist.org/packages/ocramius/proxy-manager) 17 [](https://packagist.org/packages/ocramius/proxy-manager) 18 19 20 ## Documentation 21 22 You can learn about the proxy pattern and how to use the **ProxyManager** on the [online documentation](http://ocramius.github.io/ProxyManager). 23 24 ## Installation 25 26 The suggested installation method is via [composer](https://getcomposer.org/): 27 28 ```sh 29 php composer.phar require ocramius/proxy-manager:1.0.* 30 ``` 31 32 ## Proxy example 33 34 Here's how you build a lazy loadable object with ProxyManager using a *Virtual Proxy* 35 36 ```php 37 $factory = new \ProxyManager\Factory\LazyLoadingValueHolderFactory(); 38 39 $proxy = $factory->createProxy( 40 'MyApp\HeavyComplexObject', 41 function (& $wrappedObject, $proxy, $method, $parameters, & $initializer) { 42 $wrappedObject = new HeavyComplexObject(); // instantiation logic here 43 $initializer = null; // turning off further lazy initialization 44 } 45 ); 46 47 $proxy->doFoo(); 48 ``` 49 50 See the [online documentation](http://ocramius.github.io/ProxyManager) for more supported proxy types and examples.
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Wed Nov 11 20:33:01 2020 | Cross-referenced by PHPXref 0.7.1 |