diff options
Diffstat (limited to 'include/class.h')
-rw-r--r-- | include/class.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/include/class.h b/include/class.h index 9fa14a7..31e29a8 100644 --- a/include/class.h +++ b/include/class.h @@ -247,7 +247,7 @@ private: T *object = (T *)base; // call the method on the base object - return base->__call(name, params); + return object->__call(name, params); } /** @@ -302,6 +302,19 @@ private: } /** + * Call the __destruct method + * @param object + */ + virtual Value callDestruct(Base *base) const override + { + // cast to actual object + T *obj = (T *)base; + + // pass on + return obj->__destruct(); + } + + /** * Call a the __callStatic() function * @param name Name of the function * @param params Parameters passed to the function |