Last active
August 9, 2017 00:13
-
-
Save sean3z/9f1a9566f95379b88b489657140a6227 to your computer and use it in GitHub Desktop.
Zephir Zend Registry fill
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Here we conditionally defined Zend_Registry | |
* When our custom Zephir module is installed, Zend\Registry becomes available. | |
* https://github.com/sean3z/zendframework-zephir | |
*/ | |
if (class_exists('Zend\\Registry')) { | |
class Zend_Registry extends Zend\Registry { | |
// No code block needed here since we extend Zend\Registry | |
} | |
} else { | |
class Zend_Registry extends ArrayObject { | |
/** | |
* Stock ZF1 Zend_Registry block goes here | |
* https://github.com/zf1/zend-registry/blob/master/library/Zend/Registry.php | |
*/ | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment