- if (obj->cat) {
- update_property_obj(&obj->std, ZEND_STRL("catalog"), obj->cat);
- obj->opt.pcatalog = php_ion_obj(catalog, obj->cat)->cat;
- } else {
- zend_update_property_null(NULL, &obj->std, ZEND_STRL("catalog"));
- }
- if (obj->dec_ctx) {
- update_property_obj(&obj->std, ZEND_STRL("decimalContext"), obj->dec_ctx);
- obj->opt.decimal_context = &php_ion_obj(decimal_ctx, obj->dec_ctx)->ctx;
- } else {
- zend_update_property_null(NULL, &obj->std, ZEND_STRL("decimalContext"));
- }
- zend_update_property_bool(obj->std.ce, &obj->std, ZEND_STRL("outputBinary"),
- obj->opt.output_as_binary = binary);
- zend_update_property_bool(obj->std.ce, &obj->std, ZEND_STRL("compactFloats"),
- obj->opt.compact_floats = compact_floats);
- zend_update_property_bool(obj->std.ce, &obj->std, ZEND_STRL("escapeNonAscii"),
- obj->opt.escape_all_non_ascii = escape);
- zend_update_property_bool(obj->std.ce, &obj->std, ZEND_STRL("prettyPrint"),
- obj->opt.pretty_print = pretty);
- zend_update_property_bool(obj->std.ce, &obj->std, ZEND_STRL("indentTabs"),
- obj->opt.indent_with_tabs = tabs);
- zend_update_property_long(obj->std.ce, &obj->std, ZEND_STRL("indentSize"),
- obj->opt.indent_size = (SIZE) indent);
- zend_update_property_bool(obj->std.ce, &obj->std, ZEND_STRL("smallContainersInline"),
- obj->opt.small_containers_in_line = small_cntr_inl);
- zend_update_property_bool(obj->std.ce, &obj->std, ZEND_STRL("suppressSystemValues"),
- obj->opt.supress_system_values = suppress_sys);
- zend_update_property_bool(obj->std.ce, &obj->std, ZEND_STRL("flushEveryValue"),
- obj->opt.flush_every_value = flush);
- zend_update_property_long(obj->std.ce, &obj->std, ZEND_STRL("maxContainerDepth"),
- obj->opt.max_container_depth = (SIZE) max_depth);
- zend_update_property_long(obj->std.ce, &obj->std, ZEND_STRL("maxAnnotations"),
- obj->opt.max_annotation_count = (SIZE) max_ann);
- zend_update_property_long(obj->std.ce, &obj->std, ZEND_STRL("tempBufferSize"),
- obj->opt.temp_buffer_size = (SIZE) temp);
- zend_update_property_long(obj->std.ce, &obj->std, ZEND_STRL("allocationPageSize"),
- obj->opt.allocation_page_size = (SIZE) alloc);
+ obj->options.output_as_binary = binary;
+ obj->options.compact_floats = compact_floats;
+ obj->options.escape_all_non_ascii = escape;
+ obj->options.pretty_print = pretty;
+ obj->options.indent_with_tabs = tabs;
+ obj->options.indent_size = (SIZE) indent;
+ obj->options.flush_every_value = flush;
+ obj->options.max_container_depth = (SIZE) max_depth;
+ obj->options.max_annotation_count = (SIZE) max_ann;
+ obj->options.temp_buffer_size = (SIZE) temp;
+
+ php_ion_writer_ctor(obj);
+}
+
+static ZEND_METHOD(ion_Writer_Writer, __construct)
+{
+ _ion_Writer_Writer___construct(false, INTERNAL_FUNCTION_PARAM_PASSTHRU);