[ Index ]

PHP Cross Reference of phpBB-3.2.11-deutsch

title

Body

[close]

/vendor/ocramius/proxy-manager/ -> README.md (source)

   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  ![ProxyManager](proxy-manager.png)
   6  
   7  [![Build Status](https://travis-ci.org/Ocramius/ProxyManager.png?branch=master)](https://travis-ci.org/Ocramius/ProxyManager)
   8  [![Code Coverage](https://scrutinizer-ci.com/g/Ocramius/ProxyManager/badges/coverage.png?s=ca3b9ceb9e36aeec0e57569cc8983394b7d2a59e)](https://scrutinizer-ci.com/g/Ocramius/ProxyManager/)
   9  [![Scrutinizer Quality Score](https://scrutinizer-ci.com/g/Ocramius/ProxyManager/badges/quality-score.png?s=eaa858f876137ed281141b1d1e98acfa739729ed)](https://scrutinizer-ci.com/g/Ocramius/ProxyManager/)
  10  [![SensioLabsInsight](https://insight.sensiolabs.com/projects/69fe5f97-b1c8-4ddd-93ce-900b8b788cf2/mini.png)](https://insight.sensiolabs.com/projects/69fe5f97-b1c8-4ddd-93ce-900b8b788cf2)
  11  [![Dependency Status](https://www.versioneye.com/package/php--ocramius--proxy-manager/badge.png)](https://www.versioneye.com/package/php--ocramius--proxy-manager)
  12  [![Reference Status](https://www.versioneye.com/php/ocramius:proxy-manager/reference_badge.svg)](https://www.versioneye.com/php/ocramius:proxy-manager/references)
  13  [![HHVM Status](http://hhvm.h4cc.de/badge/ocramius/proxy-manager.png)](http://hhvm.h4cc.de/package/ocramius/proxy-manager)
  14  
  15  [![Total Downloads](https://poser.pugx.org/ocramius/proxy-manager/downloads.png)](https://packagist.org/packages/ocramius/proxy-manager)
  16  [![Latest Stable Version](https://poser.pugx.org/ocramius/proxy-manager/v/stable.png)](https://packagist.org/packages/ocramius/proxy-manager)
  17  [![Latest Unstable Version](https://poser.pugx.org/ocramius/proxy-manager/v/unstable.png)](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. 


Generated: Wed Nov 11 20:33:01 2020 Cross-referenced by PHPXref 0.7.1