summaryrefslogtreecommitdiff
path: root/include/classbase.h
diff options
context:
space:
mode:
authorEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2014-03-09 22:37:41 +0100
committerEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2014-03-09 22:37:41 +0100
commit49d88d98a0656233f15923d31ea67a1ed229e514 (patch)
tree04bb753e4d5434c46bd90048e52d22260052334d /include/classbase.h
parentbdca5b0454534413f10d13211885c086fafff35a (diff)
work in progress on iterators
Diffstat (limited to 'include/classbase.h')
-rw-r--r--include/classbase.h19
1 files changed, 17 insertions, 2 deletions
diff --git a/include/classbase.h b/include/classbase.h
index 81454ba..1be2538 100644
--- a/include/classbase.h
+++ b/include/classbase.h
@@ -97,14 +97,20 @@ public:
* Construct a new instance of the object
* @return Base
*/
- virtual Base* construct() = 0;
+ virtual Base* construct() const = 0;
/**
* Create a clone of an object
* @param orig
* @return Base
*/
- virtual Base *clone(Base *orig) = 0;
+ virtual Base *clone(Base *orig) const = 0;
+
+ /**
+ * Is this a traversable class?
+ * @return bool
+ */
+ virtual bool traversable() const = 0;
/**
* Initialize the class, given its name
@@ -283,6 +289,15 @@ private:
static struct _zend_object_handlers *objectHandlers();
/**
+ * Function to create a new iterator to iterate over an object
+ * @param entry The class entry
+ * @param object The object to iterate over
+ * @param by_ref ?????
+ * @return zend_object_iterator* Pointer to the iterator
+ */
+ static struct _zend_object_iterator *getIterator(struct _zend_class_entry *entry, struct _zval_struct *object, int by_ref);
+
+ /**
* Name of the class
* @var string
*/