[ Index ]

PHP Cross Reference of phpBB-3.3.14-deutsch

title

Body

[close]

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

   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  ![ProxyManager](https://raw.githubusercontent.com/Ocramius/ProxyManager/917bf1698243a1079aaa27ed8ea08c2aef09f4cb/proxy-manager.png)
  12  
  13  [![Build Status](https://travis-ci.org/Ocramius/ProxyManager.png?branch=master)](https://travis-ci.org/Ocramius/ProxyManager)
  14  [![Code Coverage](https://scrutinizer-ci.com/g/Ocramius/ProxyManager/badges/coverage.png?s=ca3b9ceb9e36aeec0e57569cc8983394b7d2a59e)](https://scrutinizer-ci.com/g/Ocramius/ProxyManager/)
  15  [![Scrutinizer Quality Score](https://scrutinizer-ci.com/g/Ocramius/ProxyManager/badges/quality-score.png?s=eaa858f876137ed281141b1d1e98acfa739729ed)](https://scrutinizer-ci.com/g/Ocramius/ProxyManager/)
  16  [![SensioLabsInsight](https://insight.sensiolabs.com/projects/69fe5f97-b1c8-4ddd-93ce-900b8b788cf2/mini.png)](https://insight.sensiolabs.com/projects/69fe5f97-b1c8-4ddd-93ce-900b8b788cf2)
  17  [![Dependency Status](https://www.versioneye.com/package/php--ocramius--proxy-manager/badge.png)](https://www.versioneye.com/package/php--ocramius--proxy-manager)
  18  [![Reference Status](https://www.versioneye.com/php/ocramius:proxy-manager/reference_badge.svg)](https://www.versioneye.com/php/ocramius:proxy-manager/references)
  19  
  20  [![Total Downloads](https://poser.pugx.org/ocramius/proxy-manager/downloads.png)](https://packagist.org/packages/ocramius/proxy-manager)
  21  [![Latest Stable Version](https://poser.pugx.org/ocramius/proxy-manager/v/stable.png)](https://packagist.org/packages/ocramius/proxy-manager)
  22  [![Latest Unstable Version](https://poser.pugx.org/ocramius/proxy-manager/v/unstable.png)](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  [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](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. 


Generated: Mon Nov 25 19:05:08 2024 Cross-referenced by PHPXref 0.7.1