summaryrefslogtreecommitdiff
path: root/include/parameters.h
diff options
context:
space:
mode:
authorEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2014-04-06 20:07:15 +0200
committerEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2014-04-06 20:07:15 +0200
commite8b7f9a5f80c0f296d05403a84a5259cb48f9329 (patch)
tree9540b2d1844286526a508baaefabc24ca5d2f9f3 /include/parameters.h
parent436cab2f1646a7fe54d977b7abf49fa3dfd86639 (diff)
refactored parameters class so that no zend engine dependency is necessary in the include files
Diffstat (limited to 'include/parameters.h')
-rw-r--r--include/parameters.h29
1 files changed, 16 insertions, 13 deletions
diff --git a/include/parameters.h b/include/parameters.h
index fa53004..b464260 100644
--- a/include/parameters.h
+++ b/include/parameters.h
@@ -22,15 +22,25 @@ class Base;
*/
class Parameters : public std::vector<Value>
{
-public:
+private:
/**
- * Constructor
- * @param this_ptr Optional this_ptr
- * @param argc Number of arguments
- * @param tsrm_ls
+ * The base object
+ * @var Base
*/
- Parameters(struct _zval_struct *this_ptr, int argc TSRMLS_DC);
+ Base *_object = nullptr;
+protected:
+ /**
+ * Protected constructor
+ *
+ * The constructor is protected because extension programmers are not
+ * supposed to instantiate parameters objects themselves
+ *
+ * @param object The 'this' object
+ */
+ Parameters(Base *object) : _object(object) {}
+
+public:
/**
* Destructor
*/
@@ -44,13 +54,6 @@ public:
{
return _object;
}
-
-private:
- /**
- * The base object
- * @var Base
- */
- Base *_object = nullptr;
};
/**