diff options
-rw-r--r-- | include/object.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/include/object.h b/include/object.h index 47935d7..6350259 100644 --- a/include/object.h +++ b/include/object.h @@ -41,13 +41,21 @@ public: */ Object(const Value &value) : Value() { - // string types are instantiated - if (value.isString()) { + // when a string is passed in, we are going to make a new instance of the + // passed in string + if (value.isString()) + { + // instantiate the object instantiate(value); + + // and call the __construct method call("__construct"); } - // otherwise copy the other object - else operator=(value); + else + { + // this simply copies the other object + operator=(value); + } } /** |