ArrayObject.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. /**
  3. * Zend Framework (http://framework.zend.com/)
  4. *
  5. * @link http://github.com/zendframework/zf2 for the canonical source repository
  6. * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
  7. * @license http://framework.zend.com/license/new-bsd New BSD License
  8. */
  9. namespace Zend\Stdlib;
  10. /**
  11. * If the version is less than 5.3.4, we'll use Zend\Stdlib\ArrayObject\PhpLegacyCompatibility
  12. * which extends the native PHP ArrayObject implementation. For versions greater than or equal
  13. * to 5.3.4, we'll use Zend\Stdlib\ArrayObject\PhpReferenceCompatibility, which corrects
  14. * issues with how PHP handles references inside ArrayObject.
  15. *
  16. * class_alias is a global construct, so we can alias either one to Zend\Stdlib\ArrayObject,
  17. * and from this point forward, that alias will be used.
  18. */
  19. if (version_compare(PHP_VERSION, '5.3.4', 'lt')) {
  20. class_alias('Zend\Stdlib\ArrayObject\PhpLegacyCompatibility', 'Zend\Stdlib\AbstractArrayObject');
  21. } else {
  22. class_alias('Zend\Stdlib\ArrayObject\PhpReferenceCompatibility', 'Zend\Stdlib\AbstractArrayObject');
  23. }
  24. /**
  25. * Custom framework ArrayObject implementation
  26. *
  27. * Extends version-specific "abstract" implementation.
  28. */
  29. class ArrayObject extends AbstractArrayObject
  30. {
  31. }