summaryrefslogtreecommitdiff
path: root/src/parameters.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/parameters.cpp')
-rw-r--r--src/parameters.cpp39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/parameters.cpp b/src/parameters.cpp
new file mode 100644
index 0000000..d31f49c
--- /dev/null
+++ b/src/parameters.cpp
@@ -0,0 +1,39 @@
+/**
+ * Parameters.cpp
+ *
+ * @author Emiel Bruijntjes <emiel.bruijntjes@copernica.com>
+ * @copyright 2013 Copernica BV
+ */
+#include "includes.h"
+
+/**
+ * Set up namespace
+ */
+namespace Php {
+
+/**
+ * Parameters
+ * @param argc Number of arguments
+ * @param tsrm_ls
+ */
+Parameters::Parameters(int argc TSRMLS_DC)
+{
+ // reserve plenty of space
+ reserve(argc);
+
+ // loop through the arguments
+ for (int i=0; i<argc; i++)
+ {
+ // get the argument
+ zval **arg = (zval **) (zend_vm_stack_top(TSRMLS_C) - 1 - (argc-i));
+
+ // append value
+ push_back(Value(*arg));
+ }
+}
+
+/**
+ * End of namespace
+ */
+}
+