summaryrefslogtreecommitdiff
path: root/include/object.h
diff options
context:
space:
mode:
authorEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2014-03-04 18:21:58 +0100
committerEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2014-03-04 18:21:58 +0100
commitc028e8f932cc4206ab8446409693fba8dfe18ffb (patch)
tree4ffe8a5d77888cff291eb7dd412bbd03e51c6f29 /include/object.h
parent200952ad4004f6ee5527598622505adbe84df8af (diff)
Php::Value and Php::Object classes can now be used to wrap around Php::Base objects
Diffstat (limited to 'include/object.h')
-rw-r--r--include/object.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/include/object.h b/include/object.h
index b3ea5bc..ff2f7c1 100644
--- a/include/object.h
+++ b/include/object.h
@@ -49,6 +49,33 @@ public:
}
/**
+ * Constructor to create a new instance of a builtin class
+ *
+ * You can use this constructor if you have created an instance of your
+ * own class, but has not assigned it to a variable yet. This happens
+ * for example for classes that are not constructed from PHP userspace,
+ * but from your own functions:
+ *
+ * Php::Value yourFunction()
+ * {
+ * return Php::Object("MyClass", new MyClass());
+ * }
+ *
+ * When you construct objects like this, the __construct function is not
+ * going to be called. If you want to construct the object just as if it
+ * was constructed from PHP user space, do this:
+ *
+ * Php::Value yourFunction()
+ * {
+ * return Php::Object("MyClass");
+ * }
+ *
+ * @param name Name of the class to instantiate
+ * @param base Implementation of the class
+ */
+ Object(const char *name, Base *base);
+
+ /**
* Constructor to create a new instance
*
* This constructor comes in many different forms, to support all possible