summaryrefslogtreecommitdiff
path: root/include/constant.h
diff options
context:
space:
mode:
authorEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2015-01-25 18:38:35 +0100
committerEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2015-01-25 18:38:35 +0100
commit3e6fb6ef89600abf2a282396384aab80ec9390ce (patch)
treefb15a9b4a5379823f787beccc0f34d6ebd8af74c /include/constant.h
parent089c92358d4f43f1715d94244acb4d665fe50d29 (diff)
Php::Constant objects can now also be added to a Php::Class to create class constants
Diffstat (limited to 'include/constant.h')
-rw-r--r--include/constant.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/constant.h b/include/constant.h
index 619ce46..36b3417 100644
--- a/include/constant.h
+++ b/include/constant.h
@@ -47,6 +47,26 @@ public:
* Destructor
*/
virtual ~Constant() {}
+
+ /**
+ * Add the constant to a class
+ *
+ * You normally do not have to call this method yourself. You can simply
+ * do one of the following method calls to create class constants:
+ *
+ * myclass.property("MY_CONSTANT", "value", Php::Const);
+ * myclass.constant("MY_CONSTANT", "value");
+ * myclass.add(Php::Constant("MY_CONSTANT", "value"));
+ *
+ * All of the calls have the same result, it is up to you to decide which
+ * one suits you most. If you use the last one - using a Php::Constant
+ * class - the PHP-CPP library will call this "addTo()" method internally
+ * to forward the call to one of the other methods.
+ *
+ * @param clss Class to which the constant is added
+ * @internal
+ */
+ void addTo(ClassBase &clss);
private:
/**