diff options
author | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2015-01-25 20:41:13 +0100 |
---|---|---|
committer | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2015-01-25 20:41:13 +0100 |
commit | b2758c687ab8c36ef7a48787b4d590255e69cbc0 (patch) | |
tree | 7b5133ef683103ccd8a9cfef53413b1a8b9f5f76 /include/value.h | |
parent | 110f379c083a9e061d2337efabb86f12ce0fa750 (diff) |
added Php::define() function to create constants at run time
Diffstat (limited to 'include/value.h')
-rw-r--r-- | include/value.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/value.h b/include/value.h index dbd3788..b962415 100644 --- a/include/value.h +++ b/include/value.h @@ -378,6 +378,7 @@ public: bool isFloat() const { return type() == Type::Float; } bool isObject() const { return type() == Type::Object; } bool isArray() const { return type() == Type::Array; } + bool isScalar() const { return isNull() || isNumeric() || isBool() || isString() || isFloat(); } bool isCallable() const; /** @@ -1161,6 +1162,7 @@ protected: * Functions that need access to the privates */ friend Value constant(const char *name, size_t size); + friend bool define(const char *name, size_t size, const Value &value); /** * The Globals and Member classes can access the zval directly |