Skip to content

Instantly share code, notes, and snippets.

@sean3z
Last active August 9, 2017 00:13
Show Gist options
  • Save sean3z/9f1a9566f95379b88b489657140a6227 to your computer and use it in GitHub Desktop.
Save sean3z/9f1a9566f95379b88b489657140a6227 to your computer and use it in GitHub Desktop.
Zephir Zend Registry fill
<?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