summaryrefslogtreecommitdiff
path: root/include/value.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/value.h')
-rw-r--r--include/value.h29
1 files changed, 28 insertions, 1 deletions
diff --git a/include/value.h b/include/value.h
index 6b764a2..0990e82 100644
--- a/include/value.h
+++ b/include/value.h
@@ -565,7 +565,6 @@ public:
* Call the function in PHP
* We have ten variants of this function, depending on the number of parameters
* This call operator is only useful when the variable represents a callable
- * @param name Name of the function
* @return Value
*/
Value operator()();
@@ -580,6 +579,25 @@ public:
Value operator()(Value p0, Value p1, Value p2, Value p3, Value p4, Value p5, Value p6, Value p7, Value p8);
Value operator()(Value p0, Value p1, Value p2, Value p3, Value p4, Value p5, Value p6, Value p7, Value p8, Value p9);
+ /**
+ * Call a method
+ * We have ten variants of this function, depending on the number of parameters
+ * This is only applicable when the Value contains PHP object
+ * @param name Name of the function
+ * @return Value
+ */
+ Value call(const std::string &name);
+ Value call(const std::string &name, Value p0);
+ Value call(const std::string &name, Value p0, Value p1);
+ Value call(const std::string &name, Value p0, Value p1, Value p2);
+ Value call(const std::string &name, Value p0, Value p1, Value p2, Value p3);
+ Value call(const std::string &name, Value p0, Value p1, Value p2, Value p3, Value p4);
+ Value call(const std::string &name, Value p0, Value p1, Value p2, Value p3, Value p4, Value p5);
+ Value call(const std::string &name, Value p0, Value p1, Value p2, Value p3, Value p4, Value p5, Value p6);
+ Value call(const std::string &name, Value p0, Value p1, Value p2, Value p3, Value p4, Value p5, Value p6, Value p7);
+ Value call(const std::string &name, Value p0, Value p1, Value p2, Value p3, Value p4, Value p5, Value p6, Value p7, Value p8);
+ Value call(const std::string &name, Value p0, Value p1, Value p2, Value p3, Value p4, Value p5, Value p6, Value p7, Value p8, Value p9);
+
private:
/**
* Call function with a number of parameters
@@ -589,6 +607,15 @@ private:
*/
Value exec(int argc, struct _zval_struct ***params);
+ /**
+ * 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 exec(const std::string &name, int argc, struct _zval_struct ***params);
+
protected:
/**
* The wrapped zval