Skip to content

Commit

Permalink
Fake scanners out
Browse files Browse the repository at this point in the history
- Use __halt_compiler(), and then define stub class, in order to trick
  classmap compilers into thinking a class exists.
  • Loading branch information
weierophinney committed Mar 5, 2013
1 parent 010f534 commit a94f497
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion library/Zend/Stdlib/ArrayObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

namespace Zend\Stdlib;

/**
* If the version is less than 5.3.4, we'll use Zend\Stdlib\ArrayObject\PhpLegacyCompatibility
* which extends the native PHP ArrayObject implementation. For versions greater than or equal
* to 5.3.4, we'll use Zend\Stdlib\ArrayObject\PhpReferenceCompatibility, which corrects
* issues with how PHP handles references inside ArrayObject.
*
*
* class_alias is a global construct, so we can alias either one to Zend\Stdlib\ArrayObject,
* and from this point forward, that alias will be used.
*/
Expand All @@ -21,3 +23,9 @@ class_alias('Zend\Stdlib\ArrayObject\PhpLegacyCompatibility', 'Zend\Stdlib\Array
} else {
class_alias('Zend\Stdlib\ArrayObject\PhpReferenceCompatibility', 'Zend\Stdlib\ArrayObject');
}

__halt_compiler();

class ArrayObject extends \ArrayObject
{
}

0 comments on commit a94f497

Please sign in to comment.