From db7cb1d6e44470b820fd5f4f4650a8c4ce392ab6 Mon Sep 17 00:00:00 2001 From: Emiel Bruijntjes Date: Thu, 23 Jul 2015 11:20:18 +0200 Subject: It now is possible to assign Php::Value["whatever"] results directly to new Php::Value objects --- include/value.h | 2 ++ zend/value.cpp | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/include/value.h b/include/value.h index e61750b..3aad995 100644 --- a/include/value.h +++ b/include/value.h @@ -164,6 +164,8 @@ public: Value &operator=(const std::string &value); Value &operator=(const char *value); Value &operator=(double value); + Value &operator=(const HashMember &value); + Value &operator=(const HashMember &value); /** * Add a value to the object diff --git a/zend/value.cpp b/zend/value.cpp index 7c95c06..5354904 100644 --- a/zend/value.cpp +++ b/zend/value.cpp @@ -688,6 +688,28 @@ Value &Value::operator=(double value) return *this; } +/** + * Assignment operator + * @param value + * @return Value + */ +Value &Value::operator=(const HashMember &value) +{ + // assign value object + return operator=(value.value()); +} + +/** + * Assignment operator + * @param value + * @return Value + */ +Value &Value::operator=(const HashMember &value) +{ + // assign value object + return operator=(value.value()); +} + /** * Add a value to the object * @param value -- cgit v1.2.3