summaryrefslogtreecommitdiff
path: root/zend
diff options
context:
space:
mode:
authorToon Schoenmakers <toon.schoenmakers@copernica.com>2015-05-18 14:42:36 +0200
committerToon Schoenmakers <toon.schoenmakers@copernica.com>2015-05-18 14:42:36 +0200
commitb7729b98bbd91dcff66c3712f85f477dbd86d4a3 (patch)
tree19a27f551366139a43727d3fcabaa7e031ffbf2b /zend
parent9956d998368e0d9f55e1940f4d584fe1554c7418 (diff)
We are now ABI compatible with the latest release again
Diffstat (limited to 'zend')
-rw-r--r--zend/value.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/zend/value.cpp b/zend/value.cpp
index a728dcc..9fb59f4 100644
--- a/zend/value.cpp
+++ b/zend/value.cpp
@@ -884,6 +884,17 @@ Value Value::call(const char *name) const
}
/**
+ * Call the method - if the variable holds an object with the given method
+ * @param name name of the method to call
+ * @return Value
+ */
+Value Value::call(const char *name)
+{
+ // call with zero parameters
+ return exec(name, 0, NULL);
+}
+
+/**
* Helper function that runs the actual call
* @param object The object to call it on
* @param method The function or method to call
@@ -953,6 +964,22 @@ Value Value::exec(const char *name, int argc, struct _zval_struct ***params) con
}
/**
+ * Call method with a number of parameters
+ * @param name Name of method to call
+ * @param argc Number of parameters
+ * @param argv The parameters
+ * @return Value
+ */
+Value Value::exec(const char *name, int argc, struct _zval_struct ***params)
+{
+ // wrap the name in a Php::Value object to get a zval
+ Value method(name);
+
+ // call helper function
+ return do_exec(&_val, method._val, argc, params);
+}
+
+/**
* Comparison operators== for hardcoded Value
* @param value
*/