patternPluginManagerPolyfill.php 658 B

123456789101112131415161718
  1. <?php
  2. /**
  3. * @see https://github.com/zendframework/zend-cache for the canonical source repository
  4. * @copyright Copyright (c) 2017 Zend Technologies USA Inc. (http://www.zend.com)
  5. * @license https://github.com/zendframework/zend-cache/blob/master/LICENSE.md New BSD License
  6. */
  7. use Zend\Cache\PatternPluginManager;
  8. use Zend\ServiceManager\ServiceManager;
  9. call_user_func(function () {
  10. $target = method_exists(ServiceManager::class, 'configure')
  11. ? PatternPluginManager\PatternPluginManagerV3Polyfill::class
  12. : PatternPluginManager\PatternPluginManagerV2Polyfill::class;
  13. class_alias($target, PatternPluginManager::class);
  14. });