From 015976d7d24ac1ae6deb474b9d70e5703f54f449 Mon Sep 17 00:00:00 2001 From: "sgunderson@bigfoot.com" <> Date: Thu, 22 Sep 2011 23:05:49 +0200 Subject: [PATCH] Implement cloning in php5-swig. --- php5-swig/xml-template.swig | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/php5-swig/xml-template.swig b/php5-swig/xml-template.swig index d395ac2..fa9e7aa 100644 --- a/php5-swig/xml-template.swig +++ b/php5-swig/xml-template.swig @@ -44,7 +44,13 @@ Directive* convert_php_objects_to_directive(zval *obj) } return new Substitute(my_map); } else { - printf("ARRAY\n"); + std::vector subdirectives; + for (unsigned i = 0; i < ht->nNumOfElements; ++i) { + zval **data; + zend_hash_index_find(ht, i, (void **)&data); + subdirectives.push_back(convert_php_objects_to_directive(*data)); + } + return new Clone(subdirectives); } break; } -- 2.39.2