From 8f24af4c28e74ef1769aef6ab00c480e09be7453 Mon Sep 17 00:00:00 2001 From: Emiel Bruijntjes Date: Sun, 2 Mar 2014 23:28:10 +0100 Subject: work in progress to support implementing SPL interfaces, disabled the _self variable in Php::Base because by having each object keeping a reference to itself, the refcounter never reached zero and the object was thus never destructed, checking if we can get a new implementation one way or another --- src/countable.cpp | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 src/countable.cpp (limited to 'src/countable.cpp') diff --git a/src/countable.cpp b/src/countable.cpp new file mode 100644 index 0000000..6182afd --- /dev/null +++ b/src/countable.cpp @@ -0,0 +1,32 @@ +/** + * Countable.cpp + * + * Implementation of the Countable interface + * + * @author Emiel Bruijntjes + * @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 + */ +} + -- cgit v1.2.3