refactor serde interfaces and impls
[awesomized/ext-ion] / ion_arginfo.h
index 900715d5383b30274a912dd01599ccee969228ce..aea20af2d586f2e64efd67a188c713d6c60f752e 100644 (file)
@@ -1,23 +1,19 @@
 /* This is a generated file, edit the .stub.php file instead.
- * Stub hash: 6dcf67bb6d8b532d66b378544582f68e2508b7b2 */
+ * Stub hash: 771b0ba1db693b7506ff427a667d029630caca09 */
 
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ion_serialize, 0, 1, IS_STRING, 0)
        ZEND_ARG_TYPE_INFO(0, data, IS_MIXED, 0)
-       ZEND_ARG_OBJ_INFO_WITH_DEFAULT_VALUE(0, serializer, ion\\Serializer, 1, "null")
+       ZEND_ARG_OBJ_TYPE_MASK(0, serializer, ion\\Serializer, MAY_BE_ARRAY|MAY_BE_NULL, "null")
 ZEND_END_ARG_INFO()
 
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ion_unserialize, 0, 1, IS_MIXED, 0)
        ZEND_ARG_INFO(0, data)
-       ZEND_ARG_OBJ_INFO_WITH_DEFAULT_VALUE(0, unserializer, ion\\Unserializer, 1, "null")
+       ZEND_ARG_OBJ_TYPE_MASK(0, unserializer, ion\\Unserializer, MAY_BE_ARRAY|MAY_BE_NULL, "null")
 ZEND_END_ARG_INFO()
 
-ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_ion_Symbol_Table_PHP, 0, 0, ion\\Symbol\\Table, 0)
-ZEND_END_ARG_INFO()
-
-#define arginfo_ion_Symbol_Table_System arginfo_ion_Symbol_Table_PHP
-
-ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ion_Serializer_serialize, 0, 1, IS_STRING, 0)
+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ion_Serializer_serialize, 0, 1, IS_MIXED, 0)
        ZEND_ARG_TYPE_INFO(0, data, IS_MIXED, 0)
+       ZEND_ARG_OBJ_TYPE_MASK(0, writer, ion\\Writer|ion\\Writer\\Options, MAY_BE_ARRAY|MAY_BE_NULL, "null")
 ZEND_END_ARG_INFO()
 
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_ion_Unserializer_unserialize, 0, 1, IS_MIXED, 0)
@@ -87,7 +83,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ion_Timestamp___construct, 0, 0, 1)
        ZEND_ARG_OBJ_TYPE_MASK(0, precision, ion\\Timestamp\\Precision, MAY_BE_LONG, NULL)
        ZEND_ARG_OBJ_TYPE_MASK(0, format, ion\\Timestamp\\Format, MAY_BE_STRING|MAY_BE_NULL, "null")
        ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, datetime, IS_STRING, 1, "null")
-       ZEND_ARG_OBJ_INFO_WITH_DEFAULT_VALUE(0, timezone, DateTimeZone, 1, "null")
+       ZEND_ARG_OBJ_TYPE_MASK(0, timezone, DateTimeZone, MAY_BE_STRING|MAY_BE_NULL, "null")
 ZEND_END_ARG_INFO()
 
 #define arginfo_class_ion_Timestamp___toString arginfo_class_ion_Symbol___toString
@@ -255,17 +251,22 @@ ZEND_END_ARG_INFO()
 
 #define arginfo_class_ion_Symbol_Table_findLocal arginfo_class_ion_Symbol_Table_find
 
-#define arginfo_class_ion_Symbol_Table_System_toSymbol arginfo_class_ion_Reader_getFieldNameSymbol
+#define arginfo_class_ion_Symbol_System_toSymbol arginfo_class_ion_Reader_getFieldNameSymbol
+
+#define arginfo_class_ion_Symbol_System_toSID arginfo_class_ion_Catalog_count
 
-#define arginfo_class_ion_Symbol_Table_System_toSID arginfo_class_ion_Catalog_count
+#define arginfo_class_ion_Symbol_System_toString arginfo_class_ion_Symbol___toString
 
-#define arginfo_class_ion_Symbol_Table_System_toString arginfo_class_ion_Symbol___toString
+ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_class_ion_Symbol_System_asTable, 0, 0, ion\\Symbol\\Table\\Shared, 0)
+ZEND_END_ARG_INFO()
+
+#define arginfo_class_ion_Symbol_PHP_toSymbol arginfo_class_ion_Reader_getFieldNameSymbol
 
-#define arginfo_class_ion_Symbol_Table_PHP_toSymbol arginfo_class_ion_Reader_getFieldNameSymbol
+#define arginfo_class_ion_Symbol_PHP_toSID arginfo_class_ion_Catalog_count
 
-#define arginfo_class_ion_Symbol_Table_PHP_toSID arginfo_class_ion_Catalog_count
+#define arginfo_class_ion_Symbol_PHP_toString arginfo_class_ion_Symbol___toString
 
-#define arginfo_class_ion_Symbol_Table_PHP_toString arginfo_class_ion_Symbol___toString
+#define arginfo_class_ion_Symbol_PHP_asTable arginfo_class_ion_Symbol_System_asTable
 
 #define arginfo_class_ion_Symbol_Table_Local___construct arginfo_class_ion_Catalog___construct
 
@@ -411,14 +412,14 @@ ZEND_END_ARG_INFO()
 
 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ion_Reader_Buffer_Reader___construct, 0, 0, 1)
        ZEND_ARG_TYPE_INFO(0, buffer, IS_STRING, 0)
-       ZEND_ARG_OBJ_INFO_WITH_DEFAULT_VALUE(0, options, ion\\Reader\\Options, 1, "null")
+       ZEND_ARG_OBJ_TYPE_MASK(0, options, ion\\Reader\\Options, MAY_BE_ARRAY|MAY_BE_NULL, "null")
 ZEND_END_ARG_INFO()
 
 #define arginfo_class_ion_Reader_Buffer_Reader_getBuffer arginfo_class_ion_Symbol___toString
 
 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ion_Reader_Stream_Reader___construct, 0, 0, 1)
        ZEND_ARG_INFO(0, stream)
-       ZEND_ARG_OBJ_INFO_WITH_DEFAULT_VALUE(0, options, ion\\Reader\\Options, 1, "null")
+       ZEND_ARG_OBJ_TYPE_MASK(0, options, ion\\Reader\\Options, MAY_BE_ARRAY|MAY_BE_NULL, "null")
 ZEND_END_ARG_INFO()
 
 #define arginfo_class_ion_Reader_Stream_Reader_getStream arginfo_class_ion_Catalog___construct
@@ -491,7 +492,7 @@ ZEND_END_ARG_INFO()
 #define arginfo_class_ion_Writer_Stream_getStream arginfo_class_ion_Catalog___construct
 
 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ion_Writer_Buffer_Writer___construct, 0, 0, 0)
-       ZEND_ARG_OBJ_INFO_WITH_DEFAULT_VALUE(0, options, ion\\Writer\\Options, 1, "null")
+       ZEND_ARG_OBJ_TYPE_MASK(0, options, ion\\Writer\\Options, MAY_BE_ARRAY|MAY_BE_NULL, "null")
 ZEND_END_ARG_INFO()
 
 #define arginfo_class_ion_Writer_Buffer_Writer_getBuffer arginfo_class_ion_Symbol___toString
@@ -500,34 +501,30 @@ ZEND_END_ARG_INFO()
 
 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ion_Writer_Stream_Writer___construct, 0, 0, 1)
        ZEND_ARG_INFO(0, stream)
-       ZEND_ARG_OBJ_INFO_WITH_DEFAULT_VALUE(0, options, ion\\Writer\\Options, 1, "null")
+       ZEND_ARG_OBJ_TYPE_MASK(0, options, ion\\Writer\\Options, MAY_BE_ARRAY|MAY_BE_NULL, "null")
 ZEND_END_ARG_INFO()
 
 #define arginfo_class_ion_Writer_Stream_Writer_getStream arginfo_class_ion_Catalog___construct
 
-ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ion_Serializer_PHP___construct, 0, 0, 0)
-       ZEND_ARG_OBJ_INFO_WITH_DEFAULT_VALUE(0, writerOptions, ion\\Writer\\Options, 1, "null")
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ion_Serializer_Serializer___construct, 0, 0, 0)
        ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, multiSequence, _IS_BOOL, 0, "false")
        ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, callMagicSerialize, _IS_BOOL, 0, "true")
        ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, callCustomSerialize, IS_STRING, 1, "null")
 ZEND_END_ARG_INFO()
 
-#define arginfo_class_ion_Serializer_PHP_serialize arginfo_class_ion_Serializer_serialize
+#define arginfo_class_ion_Serializer_Serializer_serialize arginfo_class_ion_Serializer_serialize
 
-ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ion_Unserializer_PHP___construct, 0, 0, 0)
-       ZEND_ARG_OBJ_INFO_WITH_DEFAULT_VALUE(0, readerOptions, ion\\Reader\\Options, 1, "null")
+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_ion_Unserializer_Unserializer___construct, 0, 0, 0)
        ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, multiSequence, _IS_BOOL, 0, "false")
        ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, callMagicUnserialize, _IS_BOOL, 0, "true")
        ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, callCustomUnserialize, IS_STRING, 1, "null")
 ZEND_END_ARG_INFO()
 
-#define arginfo_class_ion_Unserializer_PHP_unserialize arginfo_class_ion_Unserializer_unserialize
+#define arginfo_class_ion_Unserializer_Unserializer_unserialize arginfo_class_ion_Unserializer_unserialize
 
 
 static ZEND_FUNCTION(ion_serialize);
 static ZEND_FUNCTION(ion_unserialize);
-static ZEND_FUNCTION(ion_Symbol_Table_PHP);
-static ZEND_FUNCTION(ion_Symbol_Table_System);
 static ZEND_METHOD(ion_Symbol, __construct);
 static ZEND_METHOD(ion_Symbol, equals);
 static ZEND_METHOD(ion_Symbol, __toString);
@@ -546,6 +543,8 @@ static ZEND_METHOD(ion_Decimal, toInt);
 static ZEND_METHOD(ion_Timestamp, __construct);
 static ZEND_METHOD(ion_Timestamp, __toString);
 static ZEND_METHOD(ion_Symbol_ImportLocation, __construct);
+static ZEND_METHOD(ion_Symbol_System, asTable);
+static ZEND_METHOD(ion_Symbol_PHP, asTable);
 static ZEND_METHOD(ion_Symbol_Table_Local, __construct);
 static ZEND_METHOD(ion_Symbol_Table_Local, import);
 static ZEND_METHOD(ion_Symbol_Table_Shared, __construct);
@@ -623,17 +622,15 @@ static ZEND_METHOD(ion_Writer_Buffer_Writer, getBuffer);
 static ZEND_METHOD(ion_Writer_Buffer_Writer, resetBuffer);
 static ZEND_METHOD(ion_Writer_Stream_Writer, __construct);
 static ZEND_METHOD(ion_Writer_Stream_Writer, getStream);
-static ZEND_METHOD(ion_Serializer_PHP, __construct);
-static ZEND_METHOD(ion_Serializer_PHP, serialize);
-static ZEND_METHOD(ion_Unserializer_PHP, __construct);
-static ZEND_METHOD(ion_Unserializer_PHP, unserialize);
+static ZEND_METHOD(ion_Serializer_Serializer, __construct);
+static ZEND_METHOD(ion_Serializer_Serializer, serialize);
+static ZEND_METHOD(ion_Unserializer_Unserializer, __construct);
+static ZEND_METHOD(ion_Unserializer_Unserializer, unserialize);
 
 
 static const zend_function_entry ext_functions[] = {
        ZEND_NS_RAW_FENTRY("ion", "serialize", ZEND_FN(ion_serialize), arginfo_ion_serialize, 0)
        ZEND_NS_RAW_FENTRY("ion", "unserialize", ZEND_FN(ion_unserialize), arginfo_ion_unserialize, 0)
-       ZEND_NS_RAW_FENTRY("ion\\Symbol\\Table", "PHP", ZEND_FN(ion_Symbol_Table_PHP), arginfo_ion_Symbol_Table_PHP, 0)
-       ZEND_NS_RAW_FENTRY("ion\\Symbol\\Table", "System", ZEND_FN(ion_Symbol_Table_System), arginfo_ion_Symbol_Table_System, 0)
        ZEND_FE_END
 };
 
@@ -786,18 +783,20 @@ static const zend_function_entry class_ion_Symbol_Table_methods[] = {
 };
 
 
-static const zend_function_entry class_ion_Symbol_Table_System_methods[] = {
-       ZEND_MALIAS(ion_Symbol_Enum, toSymbol, toSymbol, arginfo_class_ion_Symbol_Table_System_toSymbol, ZEND_ACC_PUBLIC)
-       ZEND_MALIAS(ion_Symbol_Enum, toSID, toSID, arginfo_class_ion_Symbol_Table_System_toSID, ZEND_ACC_PUBLIC)
-       ZEND_MALIAS(ion_Symbol_Enum, toString, toString, arginfo_class_ion_Symbol_Table_System_toString, ZEND_ACC_PUBLIC)
+static const zend_function_entry class_ion_Symbol_System_methods[] = {
+       ZEND_MALIAS(ion_Symbol_Enum, toSymbol, toSymbol, arginfo_class_ion_Symbol_System_toSymbol, ZEND_ACC_PUBLIC)
+       ZEND_MALIAS(ion_Symbol_Enum, toSID, toSID, arginfo_class_ion_Symbol_System_toSID, ZEND_ACC_PUBLIC)
+       ZEND_MALIAS(ion_Symbol_Enum, toString, toString, arginfo_class_ion_Symbol_System_toString, ZEND_ACC_PUBLIC)
+       ZEND_ME(ion_Symbol_System, asTable, arginfo_class_ion_Symbol_System_asTable, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
        ZEND_FE_END
 };
 
 
-static const zend_function_entry class_ion_Symbol_Table_PHP_methods[] = {
-       ZEND_MALIAS(ion_Symbol_Enum, toSymbol, toSymbol, arginfo_class_ion_Symbol_Table_PHP_toSymbol, ZEND_ACC_PUBLIC)
-       ZEND_MALIAS(ion_Symbol_Enum, toSID, toSID, arginfo_class_ion_Symbol_Table_PHP_toSID, ZEND_ACC_PUBLIC)
-       ZEND_MALIAS(ion_Symbol_Enum, toString, toString, arginfo_class_ion_Symbol_Table_PHP_toString, ZEND_ACC_PUBLIC)
+static const zend_function_entry class_ion_Symbol_PHP_methods[] = {
+       ZEND_MALIAS(ion_Symbol_Enum, toSymbol, toSymbol, arginfo_class_ion_Symbol_PHP_toSymbol, ZEND_ACC_PUBLIC)
+       ZEND_MALIAS(ion_Symbol_Enum, toSID, toSID, arginfo_class_ion_Symbol_PHP_toSID, ZEND_ACC_PUBLIC)
+       ZEND_MALIAS(ion_Symbol_Enum, toString, toString, arginfo_class_ion_Symbol_PHP_toString, ZEND_ACC_PUBLIC)
+       ZEND_ME(ion_Symbol_PHP, asTable, arginfo_class_ion_Symbol_PHP_asTable, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
        ZEND_FE_END
 };
 
@@ -984,16 +983,16 @@ static const zend_function_entry class_ion_Writer_Stream_Writer_methods[] = {
 };
 
 
-static const zend_function_entry class_ion_Serializer_PHP_methods[] = {
-       ZEND_ME(ion_Serializer_PHP, __construct, arginfo_class_ion_Serializer_PHP___construct, ZEND_ACC_PUBLIC)
-       ZEND_ME(ion_Serializer_PHP, serialize, arginfo_class_ion_Serializer_PHP_serialize, ZEND_ACC_PUBLIC)
+static const zend_function_entry class_ion_Serializer_Serializer_methods[] = {
+       ZEND_ME(ion_Serializer_Serializer, __construct, arginfo_class_ion_Serializer_Serializer___construct, ZEND_ACC_PUBLIC)
+       ZEND_ME(ion_Serializer_Serializer, serialize, arginfo_class_ion_Serializer_Serializer_serialize, ZEND_ACC_PUBLIC)
        ZEND_FE_END
 };
 
 
-static const zend_function_entry class_ion_Unserializer_PHP_methods[] = {
-       ZEND_ME(ion_Unserializer_PHP, __construct, arginfo_class_ion_Unserializer_PHP___construct, ZEND_ACC_PUBLIC)
-       ZEND_ME(ion_Unserializer_PHP, unserialize, arginfo_class_ion_Unserializer_PHP_unserialize, ZEND_ACC_PUBLIC)
+static const zend_function_entry class_ion_Unserializer_Unserializer_methods[] = {
+       ZEND_ME(ion_Unserializer_Unserializer, __construct, arginfo_class_ion_Unserializer_Unserializer___construct, ZEND_ACC_PUBLIC)
+       ZEND_ME(ion_Unserializer_Unserializer, unserialize, arginfo_class_ion_Unserializer_Unserializer_unserialize, ZEND_ACC_PUBLIC)
        ZEND_FE_END
 };
 
@@ -1275,9 +1274,9 @@ static zend_class_entry *register_class_ion_Symbol_Table(void)
        return class_entry;
 }
 
-static zend_class_entry *register_class_ion_Symbol_Table_System(zend_class_entry *class_entry_ion_Symbol_Enum)
+static zend_class_entry *register_class_ion_Symbol_System(zend_class_entry *class_entry_ion_Symbol_Enum)
 {
-       zend_class_entry *class_entry = zend_register_internal_enum("ion\\Symbol\\Table\\System", IS_STRING, class_ion_Symbol_Table_System_methods);
+       zend_class_entry *class_entry = zend_register_internal_enum("ion\\Symbol\\System", IS_STRING, class_ion_Symbol_System_methods);
        zend_class_implements(class_entry, 1, class_entry_ion_Symbol_Enum);
 
        zval enum_case_Ion_value;
@@ -1328,9 +1327,9 @@ static zend_class_entry *register_class_ion_Symbol_Table_System(zend_class_entry
        return class_entry;
 }
 
-static zend_class_entry *register_class_ion_Symbol_Table_PHP(zend_class_entry *class_entry_ion_Symbol_Enum)
+static zend_class_entry *register_class_ion_Symbol_PHP(zend_class_entry *class_entry_ion_Symbol_Enum)
 {
-       zend_class_entry *class_entry = zend_register_internal_enum("ion\\Symbol\\Table\\PHP", IS_STRING, class_ion_Symbol_Table_PHP_methods);
+       zend_class_entry *class_entry = zend_register_internal_enum("ion\\Symbol\\PHP", IS_STRING, class_ion_Symbol_PHP_methods);
        zend_class_implements(class_entry, 1, class_entry_ion_Symbol_Enum);
 
        zval enum_case_PHP_value;
@@ -1883,21 +1882,14 @@ static zend_class_entry *register_class_ion_Writer_Stream_Writer(zend_class_entr
        return class_entry;
 }
 
-static zend_class_entry *register_class_ion_Serializer_PHP(zend_class_entry *class_entry_ion_Serializer)
+static zend_class_entry *register_class_ion_Serializer_Serializer(zend_class_entry *class_entry_ion_Serializer)
 {
        zend_class_entry ce, *class_entry;
 
-       INIT_NS_CLASS_ENTRY(ce, "ion\\Serializer", "PHP", class_ion_Serializer_PHP_methods);
+       INIT_NS_CLASS_ENTRY(ce, "ion\\Serializer", "Serializer", class_ion_Serializer_Serializer_methods);
        class_entry = zend_register_internal_class_ex(&ce, NULL);
        zend_class_implements(class_entry, 1, class_entry_ion_Serializer);
 
-       zend_string *property_writerOptions_class_ion_Writer_Options = zend_string_init("ion\\Writer\\Options", sizeof("ion\\Writer\\Options")-1, 1);
-       zval property_writerOptions_default_value;
-       ZVAL_UNDEF(&property_writerOptions_default_value);
-       zend_string *property_writerOptions_name = zend_string_init("writerOptions", sizeof("writerOptions") - 1, 1);
-       zend_declare_typed_property(class_entry, property_writerOptions_name, &property_writerOptions_default_value, ZEND_ACC_PUBLIC|ZEND_ACC_READONLY, NULL, (zend_type) ZEND_TYPE_INIT_CLASS(property_writerOptions_class_ion_Writer_Options, 0, MAY_BE_NULL));
-       zend_string_release(property_writerOptions_name);
-
        zval property_multiSequence_default_value;
        ZVAL_UNDEF(&property_multiSequence_default_value);
        zend_string *property_multiSequence_name = zend_string_init("multiSequence", sizeof("multiSequence") - 1, 1);
@@ -1919,21 +1911,14 @@ static zend_class_entry *register_class_ion_Serializer_PHP(zend_class_entry *cla
        return class_entry;
 }
 
-static zend_class_entry *register_class_ion_Unserializer_PHP(zend_class_entry *class_entry_ion_Unserializer)
+static zend_class_entry *register_class_ion_Unserializer_Unserializer(zend_class_entry *class_entry_ion_Unserializer)
 {
        zend_class_entry ce, *class_entry;
 
-       INIT_NS_CLASS_ENTRY(ce, "ion\\Unserializer", "PHP", class_ion_Unserializer_PHP_methods);
+       INIT_NS_CLASS_ENTRY(ce, "ion\\Unserializer", "Unserializer", class_ion_Unserializer_Unserializer_methods);
        class_entry = zend_register_internal_class_ex(&ce, NULL);
        zend_class_implements(class_entry, 1, class_entry_ion_Unserializer);
 
-       zend_string *property_readerOptions_class_ion_Reader_Options = zend_string_init("ion\\Reader\\Options", sizeof("ion\\Reader\\Options")-1, 1);
-       zval property_readerOptions_default_value;
-       ZVAL_UNDEF(&property_readerOptions_default_value);
-       zend_string *property_readerOptions_name = zend_string_init("readerOptions", sizeof("readerOptions") - 1, 1);
-       zend_declare_typed_property(class_entry, property_readerOptions_name, &property_readerOptions_default_value, ZEND_ACC_PUBLIC|ZEND_ACC_READONLY, NULL, (zend_type) ZEND_TYPE_INIT_CLASS(property_readerOptions_class_ion_Reader_Options, 0, MAY_BE_NULL));
-       zend_string_release(property_readerOptions_name);
-
        zval property_multiSequence_default_value;
        ZVAL_UNDEF(&property_multiSequence_default_value);
        zend_string *property_multiSequence_name = zend_string_init("multiSequence", sizeof("multiSequence") - 1, 1);