diff options
author | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2014-07-26 15:17:41 +0200 |
---|---|---|
committer | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2014-07-26 15:17:41 +0200 |
commit | fec2fca2df568aa059e93d59bcfb63daec686583 (patch) | |
tree | f070e53c3969c852c8ef9656e381e19e1c0f0efd /include/call.h | |
parent | 90f2c44a8dedc53de351d42107a40f56d6184899 (diff) |
modifed class_exists function to work with a char* without having to convert it into a std::string
Diffstat (limited to 'include/call.h')
-rw-r--r-- | include/call.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/call.h b/include/call.h index 05c5955..80ef6c9 100644 --- a/include/call.h +++ b/include/call.h @@ -15,6 +15,9 @@ namespace Php { /** * List of functions that are available for use in PHP */ +bool class_exists(const char *classname, size_t size, bool autoload = true); +bool class_exists(const char *classname, bool autoload = true) { return class_exists(classname, strlen(classname), autoload); } +bool class_exists(const std::string &classname, bool autoload = true) { return class_exists(classname.c_str(), classname.size(), autoload); } Value eval(const std::string &phpCode); /** |