diff options
author | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2014-04-02 23:43:33 +0200 |
---|---|---|
committer | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2014-04-02 23:43:33 +0200 |
commit | 9598dd5541c87efc654a0a05aec6bb895fabfeb1 (patch) | |
tree | ee4e44d0a307e6c75ba8846589e03b85c01cd421 | |
parent | 2e4318b5ecae22b6bc0f04dfc116ff3e4647b1e8 (diff) |
base classes can be added too, with the class::extends() method (request from issue #52)
-rw-r--r-- | src/classimpl.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/classimpl.cpp b/src/classimpl.cpp index f63ddec..521affa 100644 --- a/src/classimpl.cpp +++ b/src/classimpl.cpp @@ -1396,6 +1396,9 @@ void ClassImpl::initialize(ClassBase *base, const std::string &prefix TSRMLS_DC) entry.unserialize = &ClassImpl::unserialize; } + // do we have a base class? + if (_parent && _parent->_entry) entry.parent = _parent->_entry; + // register the class _entry = zend_register_internal_class(&entry TSRMLS_CC); |