diff options
author | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2014-03-13 15:48:29 +0100 |
---|---|---|
committer | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2014-03-13 15:48:29 +0100 |
commit | 1a8c587f3a67db2e5c38cc525b29800e86f27936 (patch) | |
tree | 38b0a17b046d2cfdd76a5e03bfb97fddfbcaceed /src/base.cpp | |
parent | e45c7c392add8fdcd0d8fe06bbb790cea2f865f0 (diff) |
magic methods no longer are virtual, so that more signatures are acceptable. added support for __callStatic()
Diffstat (limited to 'src/base.cpp')
-rw-r--r-- | src/base.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/base.cpp b/src/base.cpp index 516663d..2c46147 100644 --- a/src/base.cpp +++ b/src/base.cpp @@ -86,7 +86,7 @@ MixedObject *Base::store(zend_class_entry *entry) * @param key * @return bool */ -bool Base::__isset(const Php::Value &key) +bool Base::__isset(const Php::Value &key) const { // throw an exception that will be caught in the ClassBase class, // so that the default implementation of the unset function can be called @@ -102,7 +102,7 @@ bool Base::__isset(const Php::Value &key) * @param key * @param value */ -void Base::__set(const Php::Value &key, const Php::Value &value) +void Base::__set(const Php::Value &key, const Php::Value &value) const { // throw an exception that will be caught in the ClassBase class, // so that the default implementation of the unset function can be called @@ -118,7 +118,7 @@ void Base::__set(const Php::Value &key, const Php::Value &value) * @param key * @return value */ -Php::Value Base::__get(const Php::Value &key) +Php::Value Base::__get(const Php::Value &key) const { // throw an exception that will be caught in the ClassBase class, // so that the default implementation of the function can be called @@ -136,7 +136,7 @@ Php::Value Base::__get(const Php::Value &key) * * @param key */ -void Base::__unset(const Php::Value &key) +void Base::__unset(const Php::Value &key) const { // throw an exception that will be caught in the ClassBase class, // so that the default implementation of the function can be called @@ -154,7 +154,7 @@ void Base::__unset(const Php::Value &key) * @param params The parameters that were passed to the function * @return Value The return value */ -Value Base::__call(const char *method, Parameters ¶ms) +Value Base::__call(const char *method, Parameters ¶ms) const { // throw an exception that will be caught in the ClassBase class, // so that the default implementation of the function can be called @@ -173,7 +173,7 @@ Value Base::__call(const char *method, Parameters ¶ms) * @param params The parameters that were passed to the function * @return Value The return value */ -Value Base::__invoke(Parameters ¶ms) +Value Base::__invoke(Parameters ¶ms) const { // throw an exception that will be caught in the ClassBase class, // so that the default implementation of the function can be called @@ -191,7 +191,7 @@ Value Base::__invoke(Parameters ¶ms) * * @return Value The object as a string */ -Value Base::__toString() +Value Base::__toString() const { // throw an exception that will be caught in the ClassBase class, // so that the default implementation of the function can be called @@ -209,7 +209,7 @@ Value Base::__toString() * * @return int Integer value */ -long Base::__toInteger() +Value Base::__toInteger() const { // throw an exception that will be caught in the ClassBase class, // so that the default implementation of the function can be called @@ -227,7 +227,7 @@ long Base::__toInteger() * * @return double Floating point value */ -double Base::__toFloat() +Value Base::__toFloat() const { // throw an exception that will be caught in the ClassBase class, // so that the default implementation of the function can be called @@ -245,7 +245,7 @@ double Base::__toFloat() * * @return bool */ -bool Base::__toBool() +Value Base::__toBool() const { // throw an exception that will be caught in the ClassBase class, // so that the default implementation of the function can be called @@ -256,14 +256,14 @@ bool Base::__toBool() } /** - * Comparison operator + * Compare the object with a different object * * Check how a different object compares to this object * * @param that Object to compare with * @return int */ -bool Base::operator<(const Base &that) const +int Base::__compare(const Base &that) const { // throw an exception that will be caught in the ClassBase class, // so that the default implementation of the function can be called |