[ Index ] |
PHP Cross Reference of phpBB-3.3.14-deutsch |
[Summary view] [Print] [Text view]
1 # Proxy Manager 2 3 ## A message to Russian 🇷🇺 people 4 5 If you currently live in Russia, please read [this message](./ToRussianPeople.md). 6 7 ## Purpose 8 9 This library aims at providing abstraction for generating various kinds of [proxy classes](http://ocramius.github.io/presentations/proxy-pattern-in-php/). 10 11  12 13 [](https://travis-ci.org/Ocramius/ProxyManager) 14 [](https://scrutinizer-ci.com/g/Ocramius/ProxyManager/) 15 [](https://scrutinizer-ci.com/g/Ocramius/ProxyManager/) 16 [](https://insight.sensiolabs.com/projects/69fe5f97-b1c8-4ddd-93ce-900b8b788cf2) 17 [](https://www.versioneye.com/package/php--ocramius--proxy-manager) 18 [](https://www.versioneye.com/php/ocramius:proxy-manager/references) 19 20 [](https://packagist.org/packages/ocramius/proxy-manager) 21 [](https://packagist.org/packages/ocramius/proxy-manager) 22 [](https://packagist.org/packages/ocramius/proxy-manager) 23 24 25 ## Documentation 26 27 You can learn about the proxy pattern and how to use the **ProxyManager** in the [docs](docs), which are also 28 [compiled to HTML](http://ocramius.github.io/ProxyManager). 29 30 ## Help/Support 31 32 [](https://gitter.im/Ocramius/ProxyManager?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) 33 34 ## Installation 35 36 The suggested installation method is via [composer](https://getcomposer.org/): 37 38 ```sh 39 php composer.phar require ocramius/proxy-manager 40 ``` 41 42 ## Proxy example 43 44 Here's how you build a lazy loadable object with ProxyManager using a *Virtual Proxy* 45 46 ```php 47 $factory = new \ProxyManager\Factory\LazyLoadingValueHolderFactory(); 48 49 $proxy = $factory->createProxy( 50 \MyApp\HeavyComplexObject::class, 51 function (& $wrappedObject, $proxy, $method, $parameters, & $initializer) { 52 $wrappedObject = new \MyApp\HeavyComplexObject(); // instantiation logic here 53 $initializer = null; // turning off further lazy initialization 54 } 55 ); 56 57 $proxy->doFoo(); 58 ``` 59 60 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: Mon Nov 25 19:05:08 2024 | Cross-referenced by PHPXref 0.7.1 |