diff options
author | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2014-04-06 20:07:15 +0200 |
---|---|---|
committer | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2014-04-06 20:07:15 +0200 |
commit | e8b7f9a5f80c0f296d05403a84a5259cb48f9329 (patch) | |
tree | 9540b2d1844286526a508baaefabc24ca5d2f9f3 /include | |
parent | 436cab2f1646a7fe54d977b7abf49fa3dfd86639 (diff) |
refactored parameters class so that no zend engine dependency is necessary in the include files
Diffstat (limited to 'include')
-rw-r--r-- | include/parameters.h | 29 | ||||
-rw-r--r-- | include/valueiterator.h | 6 |
2 files changed, 16 insertions, 19 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; }; /** diff --git a/include/valueiterator.h b/include/valueiterator.h index 8bc9208..95cdac6 100644 --- a/include/valueiterator.h +++ b/include/valueiterator.h @@ -12,12 +12,6 @@ */ /** - * Forward declaration - */ -struct _hashtable; -struct bucket; - -/** * Set up namespace */ namespace Php { |