diff options
author | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2015-01-11 13:49:15 +0100 |
---|---|---|
committer | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2015-01-11 13:49:15 +0100 |
commit | ae9d580fe7a79052d614b7d48d8feb54836fe334 (patch) | |
tree | 874ed8c758b51a8c6f1b280620d70725f5936ac1 /include/call.h | |
parent | 1c663ea116121469e37ad2cb9480387c16c0236b (diff) |
added include(), require(), include_once() and require_once() methods, based on the Php::File class (feature built based on inspiration from pull request #147);
Diffstat (limited to 'include/call.h')
-rw-r--r-- | include/call.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/call.h b/include/call.h index 1a0c59f..279cbac 100644 --- a/include/call.h +++ b/include/call.h @@ -19,13 +19,16 @@ extern bool class_exists(const char *classname, size_t size, bool autoload = tr 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 eval(const std::string &phpCode); +extern Value include(const std::string &filename); +extern Value include_once(const std::string &filename); inline bool is_a(const Value &obj, const char *classname, size_t size, bool allow_string = false) { return obj.instanceOf(classname, size, allow_string); } inline bool is_a(const Value &obj, const char *classname, bool allow_string = false) { return is_a(obj, classname, strlen(classname), allow_string); } inline bool is_a(const Value &obj, const std::string &classname, bool allow_string = false) { return is_a(obj, classname.c_str(), classname.size(), allow_string); } inline bool is_subclass_of(const Value &obj, const char *classname, size_t size, bool allow_string = true) { return obj.derivedFrom(classname, size, allow_string); } inline bool is_subclass_of(const Value &obj, const char *classname, bool allow_string = true) { return is_subclass_of(obj, classname, strlen(classname), allow_string); } inline bool is_subclass_of(const Value &obj, const std::string &classname, bool allow_string = true) { return is_subclass_of(obj, classname.c_str(), classname.size(), allow_string); } - +extern Value require(const std::string &filename); +extern Value require_once(const std::string &filename); /** * Call a function in PHP |