diff options
author | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2014-03-14 10:32:32 +0100 |
---|---|---|
committer | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2014-03-14 10:32:32 +0100 |
commit | 4c55148476952276ece19f5b975ca0a0233dee4c (patch) | |
tree | f16b9da14403c33f1ca951e16e58841a3d88f091 /include/class.h | |
parent | 159781ee8257329ca9c40306f7495a8c2f31f710 (diff) |
implemented __destruct magic method
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 |