summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2014-04-06 19:48:30 +0200
committerEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2014-04-06 19:48:30 +0200
commit5e18247595e73491796ebeb2e3ac5f2e8af5042b (patch)
tree8af5b978c73384b67e32a1daee21c03c4174d95b /include
parent9bc5d1ed595e0ff0b7cec9a87d06a7923c211ebd (diff)
refactored code, so that there is no zend engine dependency left in base.h header file
Diffstat (limited to 'include')
-rw-r--r--include/base.h42
1 files changed, 17 insertions, 25 deletions
diff --git a/include/base.h b/include/base.h
index 8b3e561..87c7483 100644
--- a/include/base.h
+++ b/include/base.h
@@ -13,13 +13,21 @@ namespace Php {
/**
* Forward declarations
*/
-struct MixedObject;
+class ObjectImpl;
+
/**
* Class definition
*/
class Base
{
+private:
+ /**
+ * Object handle in the PHP engine
+ * @var ObjectImpl
+ */
+ ObjectImpl *_impl = nullptr;
+
protected:
/**
* Constructor
@@ -241,41 +249,25 @@ public:
*/
int __compare(const Base &base) const;
-
-private:
- /**
- * Store the object in the zend object cache
- * @param entry
- * @param tsrm_ls
- * @return MixedObject
- */
- MixedObject *store(struct _zend_class_entry *entry TSRMLS_DC);
+private:
/**
- * Retrieve the handle
- * @return int
+ * Get access to the implementation object
+ * @return ObjectImpl
*/
- int handle() const
+ const ObjectImpl *implementation() const
{
- return _handle;
+ return _impl;
}
-
- /**
- * The handle in the zend object cache
- * @var int
- */
- int _handle = 0;
/**
- * Friends that have access to the private members
+ * Classes that have direct access to private date
*/
- friend class Value;
+ friend class ObjectImpl;
friend class Object;
- friend class ClassImpl;
-
+ friend class Value;
};
-
/**
* End of namespace
*/