diff options
author | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2014-07-27 16:30:17 +0200 |
---|---|---|
committer | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2014-07-27 16:30:17 +0200 |
commit | 5cf1b5d53db6ddeb4b8d371baef0d9c37c0fa231 (patch) | |
tree | 42419b2397dc2c40137fe71f0bb49b11dfb9f536 | |
parent | 5e8c9017107dd48150790ac7027d9cdc67d8b09c (diff) |
renamed subclassOf() to derivedFrom() (added to pull request #110)
-rw-r--r-- | include/call.h | 2 | ||||
-rw-r--r-- | include/value.h | 6 | ||||
-rw-r--r-- | zend/value.cpp | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/include/call.h b/include/call.h index dff815c..1a0c59f 100644 --- a/include/call.h +++ b/include/call.h @@ -22,7 +22,7 @@ extern Value eval(const std::string &phpCode); 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.subclassOf(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); } diff --git a/include/value.h b/include/value.h index e6b8d69..853be96 100644 --- a/include/value.h +++ b/include/value.h @@ -991,9 +991,9 @@ public: * @param allowString Is it allowed for 'this' to be a string * @return bool */ - bool subclassOf(const char *classname, size_t size, bool allowString = false) const; - bool subclassOf(const char *classname, bool allowString = false) const { return subclassOf(classname, strlen(classname), allowString); } - bool subclassOf(const std::string &classname, bool allowString = false) const { return subclassOf(classname.c_str(), classname.size(), allowString); } + bool derivedFrom(const char *classname, size_t size, bool allowString = false) const; + bool derivedFrom(const char *classname, bool allowString = false) const { return derivedFrom(classname, strlen(classname), allowString); } + bool derivedFrom(const std::string &classname, bool allowString = false) const { return derivedFrom(classname.c_str(), classname.size(), allowString); } private: diff --git a/zend/value.cpp b/zend/value.cpp index d48e08b..61efe2f 100644 --- a/zend/value.cpp +++ b/zend/value.cpp @@ -1484,7 +1484,7 @@ bool Value::instanceOf(const char *classname, size_t size, bool allowString) con * @param allowString Is it allowed for 'this' to be a string * @return bool */ -bool Value::subclassOf(const char *classname, size_t size, bool allowString) const +bool Value::derivedFrom(const char *classname, size_t size, bool allowString) const { // we need the tsrm_ls variable TSRMLS_FETCH(); |