diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/call.h | 6 | ||||
-rw-r--r-- | include/constant.h | 2 | ||||
-rw-r--r-- | include/value.h | 5 |
3 files changed, 12 insertions, 1 deletions
diff --git a/include/call.h b/include/call.h index 279cbac..950cc3e 100644 --- a/include/call.h +++ b/include/call.h @@ -18,6 +18,12 @@ namespace Php { extern bool class_exists(const char *classname, size_t size, bool autoload = true); inline bool class_exists(const char *classname, bool autoload = true) { return class_exists(classname, strlen(classname), autoload); } inline bool class_exists(const std::string &classname, bool autoload = true) { return class_exists(classname.c_str(), classname.size(), autoload); } +extern Value constant(const char *constant); +extern Value constant(const char *constant, size_t size); +extern Value constant(const std::string &constant); +extern bool defined(const char *constant); +extern bool defined(const char *constant, size_t size); +extern bool defined(const std::string &constant); extern Value eval(const std::string &phpCode); extern Value include(const std::string &filename); extern Value include_once(const std::string &filename); diff --git a/include/constant.h b/include/constant.h index 36b3417..5e18792 100644 --- a/include/constant.h +++ b/include/constant.h @@ -66,7 +66,7 @@ public: * @param clss Class to which the constant is added * @internal */ - void addTo(ClassBase &clss); + void addTo(ClassBase &clss) const; private: /** diff --git a/include/value.h b/include/value.h index a450755..dbd3788 100644 --- a/include/value.h +++ b/include/value.h @@ -1158,6 +1158,11 @@ protected: struct _zend_class_entry *classEntry(bool allowString = true) const; /** + * Functions that need access to the privates + */ + friend Value constant(const char *name, size_t size); + + /** * The Globals and Member classes can access the zval directly */ friend class Globals; |