diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/callable.cpp | 5 | ||||
-rw-r--r-- | src/classbase.cpp | 6 | ||||
-rw-r--r-- | src/countable.cpp | 32 | ||||
-rw-r--r-- | src/includes.h | 1 |
4 files changed, 11 insertions, 33 deletions
diff --git a/src/callable.cpp b/src/callable.cpp index 66333d5..5229722 100644 --- a/src/callable.cpp +++ b/src/callable.cpp @@ -76,6 +76,9 @@ void Callable::initialize(zend_function_entry *entry, const char *classname, int entry->num_args = _argc; entry->flags = flags; + std::cout << entry->fname << " num_args " << entry->num_args << std::endl; + std::cout << entry->fname << " flags " << entry->flags << std::endl; + // we should fill the first argument as well #if PHP_VERSION_ID >= 50400 initialize((zend_internal_function_info *)entry->arg_info, classname); @@ -101,6 +104,8 @@ void Callable::initialize(zend_internal_function_info *info, const char *classna info->required_num_args = _required; info->_type_hint = (unsigned char)_return; + std::cout << "required_num_args " << info->required_num_args << std::endl; + // we do not support return-by-reference info->return_reference = false; diff --git a/src/classbase.cpp b/src/classbase.cpp index 19ac6bc..48746ec 100644 --- a/src/classbase.cpp +++ b/src/classbase.cpp @@ -248,7 +248,11 @@ void ClassBase::initialize(const std::string &prefix) _entry->ce_flags = (int)_type; // mark the interfaces as being implemented - for (auto &interface : _interfaces) zend_do_implement_interface(_entry, interface); + for (auto &interface : _interfaces) + { + std::cout << "interface: " << interface << std::endl; + zend_do_implement_interface(_entry, *interface); + } // declare all member variables for (auto &member : _members) member->initialize(_entry); diff --git a/src/countable.cpp b/src/countable.cpp deleted file mode 100644 index 6182afd..0000000 --- a/src/countable.cpp +++ /dev/null @@ -1,32 +0,0 @@ -/** - * Countable.cpp - * - * Implementation of the Countable interface - * - * @author Emiel Bruijntjes <emiel.bruijntjes@copernica.com> - * @copyright 2014 Copernica BV - */ -#include "includes.h" - -#include "spl/spl_iterators.h" - -/** - * Set up namespace - */ -namespace Php { - -/** - * Implementation of the countable interface - * @return zend_class_entry* - * @internal - */ -struct _zend_class_entry *Countable::implementation() -{ - return spl_ce_Countable; -} - -/** - * End namespace - */ -} - diff --git a/src/includes.h b/src/includes.h index 60783eb..e9718f3 100644 --- a/src/includes.h +++ b/src/includes.h @@ -59,6 +59,7 @@ #include "../include/modifiers.h" #include "../include/base.h" #include "../include/countable.h" +#include "../include/arrayaccess.h" #include "../include/classtype.h" #include "../include/classbase.h" #include "../include/class.h" |