formElementManagerPolyfill.php 623 B

1234567891011121314151617
  1. <?php
  2. /**
  3. * @link http://github.com/zendframework/zend-form for the canonical source repository
  4. * @copyright Copyright (c) 2005-2016 Zend Technologies USA Inc. (http://www.zend.com)
  5. * @license http://framework.zend.com/license/new-bsd New BSD License
  6. */
  7. use Zend\Form\FormElementManager;
  8. use Zend\ServiceManager\ServiceManager;
  9. call_user_func(function () {
  10. $target = method_exists(ServiceManager::class, 'configure')
  11. ? FormElementManager\FormElementManagerV3Polyfill::class
  12. : FormElementManager\FormElementManagerV2Polyfill::class;
  13. class_alias($target, FormElementManager::class);
  14. });