summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/call.h3
-rw-r--r--include/value.h2
2 files changed, 5 insertions, 0 deletions
diff --git a/include/call.h b/include/call.h
index 950cc3e..d807190 100644
--- a/include/call.h
+++ b/include/call.h
@@ -21,6 +21,9 @@ inline bool class_exists(const std::string &classname, bool autoload = true) {
extern Value constant(const char *constant);
extern Value constant(const char *constant, size_t size);
extern Value constant(const std::string &constant);
+extern bool define(const char *name, size_t size, const Value &value);
+extern bool define(const char *name, const Value &value);
+extern bool define(const std::string &name, const Value &value);
extern bool defined(const char *constant);
extern bool defined(const char *constant, size_t size);
extern bool defined(const std::string &constant);
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