summaryrefslogtreecommitdiff
path: root/src/parameters.cpp
diff options
context:
space:
mode:
authorEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2013-10-15 05:54:52 -0700
committerEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2013-10-15 05:54:52 -0700
commit61ba30d716dab670a5f2ed0ee2f6650375b2058d (patch)
tree711db9359015de260071088ef027b020cd95d4b3 /src/parameters.cpp
parentb2042dbd58c043ab49e9b0dbb51bf8516fe8cea8 (diff)
Calling custom member methods is now functional
Diffstat (limited to 'src/parameters.cpp')
-rw-r--r--src/parameters.cpp18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/parameters.cpp b/src/parameters.cpp
index d31f49c..2fb2eef 100644
--- a/src/parameters.cpp
+++ b/src/parameters.cpp
@@ -13,10 +13,11 @@ namespace Php {
/**
* Parameters
- * @param argc Number of arguments
+ * @param this_ptr Pointer to the object
+ * @param argc Number of arguments
* @param tsrm_ls
*/
-Parameters::Parameters(int argc TSRMLS_DC)
+Parameters::Parameters(zval *this_ptr, int argc TSRMLS_DC) : _this(this_ptr)
{
// reserve plenty of space
reserve(argc);
@@ -33,6 +34,19 @@ Parameters::Parameters(int argc TSRMLS_DC)
}
/**
+ * The the object that is called
+ * @return Base
+ */
+Base *Parameters::object()
+{
+ // get the mixed object
+ MixedObject *obj = (MixedObject *)zend_object_store_get_object(_this TSRMLS_CC);
+
+ // return the CPP object
+ return obj->cpp;
+}
+
+/**
* End of namespace
*/
}