[ Index ]

PHP Cross Reference of phpBB-3.2.11-deutsch

title

Body

[close]

/vendor/ocramius/proxy-manager/docs/ -> tuning-for-production.md (source)

   1  ## Tuning the ProxyManager for production
   2  
   3  By default, all proxy factories generate the required proxy classes at runtime.
   4  
   5  Proxy generation causes I/O operations and uses a lot of reflection, so be sure to have
   6  generated all of your proxies **before deploying your code on a live system**, or you
   7  may experience poor performance.
   8  
   9  You can configure ProxyManager so that it will try autoloading the proxies first.
  10  Generating them "bulk" is not yet implemented:
  11  
  12  ```php
  13  $config = new \ProxyManager\Configuration();
  14  $config->setProxiesTargetDir(__DIR__ . '/my/generated/classes/cache/dir');
  15  
  16  // then register the autoloader
  17  spl_autoload_register($config->getProxyAutoloader());
  18  ```
  19  
  20  Generating a classmap with all your proxy classes in it will also work perfectly.
  21  
  22  Please note that all the currently implemented `ProxyManager\Factory\*` classes accept
  23  a `ProxyManager\Configuration` object as optional constructor parameter. This allows for
  24  fine-tuning of ProxyManager according to your needs.


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