xref: /php-src/ext/simplexml/simplexml_arginfo.h (revision 53cb8967)
1 /* This is a generated file, edit the .stub.php file instead.
2  * Stub hash: 36eac2dee86bcc386c24e2cc14caa7bd3d709e82 */
3 
4 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_simplexml_load_file, 0, 1, SimpleXMLElement, MAY_BE_FALSE)
5 	ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
6 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, class_name, IS_STRING, 1, "SimpleXMLElement::class")
7 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0")
8 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, namespace_or_prefix, IS_STRING, 0, "\"\"")
9 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, is_prefix, _IS_BOOL, 0, "false")
10 ZEND_END_ARG_INFO()
11 
12 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_simplexml_load_string, 0, 1, SimpleXMLElement, MAY_BE_FALSE)
13 	ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0)
14 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, class_name, IS_STRING, 1, "SimpleXMLElement::class")
15 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0")
16 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, namespace_or_prefix, IS_STRING, 0, "\"\"")
17 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, is_prefix, _IS_BOOL, 0, "false")
18 ZEND_END_ARG_INFO()
19 
20 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_simplexml_import_dom, 0, 1, SimpleXMLElement, 1)
21 	ZEND_ARG_TYPE_INFO(0, node, IS_OBJECT, 0)
22 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, class_name, IS_STRING, 1, "SimpleXMLElement::class")
23 ZEND_END_ARG_INFO()
24 
25 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_MASK_EX(arginfo_class_SimpleXMLElement_xpath, 0, 1, MAY_BE_ARRAY|MAY_BE_NULL|MAY_BE_FALSE)
26 	ZEND_ARG_TYPE_INFO(0, expression, IS_STRING, 0)
27 ZEND_END_ARG_INFO()
28 
29 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_SimpleXMLElement_registerXPathNamespace, 0, 2, _IS_BOOL, 0)
30 	ZEND_ARG_TYPE_INFO(0, prefix, IS_STRING, 0)
31 	ZEND_ARG_TYPE_INFO(0, namespace, IS_STRING, 0)
32 ZEND_END_ARG_INFO()
33 
34 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_MASK_EX(arginfo_class_SimpleXMLElement_asXML, 0, 0, MAY_BE_STRING|MAY_BE_BOOL)
35 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, filename, IS_STRING, 1, "null")
36 ZEND_END_ARG_INFO()
37 
38 #define arginfo_class_SimpleXMLElement_saveXML arginfo_class_SimpleXMLElement_asXML
39 
40 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_SimpleXMLElement_getNamespaces, 0, 0, IS_ARRAY, 0)
41 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, recursive, _IS_BOOL, 0, "false")
42 ZEND_END_ARG_INFO()
43 
44 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_MASK_EX(arginfo_class_SimpleXMLElement_getDocNamespaces, 0, 0, MAY_BE_ARRAY|MAY_BE_FALSE)
45 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, recursive, _IS_BOOL, 0, "false")
46 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, fromRoot, _IS_BOOL, 0, "true")
47 ZEND_END_ARG_INFO()
48 
49 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_OBJ_INFO_EX(arginfo_class_SimpleXMLElement_children, 0, 0, SimpleXMLElement, 1)
50 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, namespaceOrPrefix, IS_STRING, 1, "null")
51 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, isPrefix, _IS_BOOL, 0, "false")
52 ZEND_END_ARG_INFO()
53 
54 #define arginfo_class_SimpleXMLElement_attributes arginfo_class_SimpleXMLElement_children
55 
56 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SimpleXMLElement___construct, 0, 0, 1)
57 	ZEND_ARG_TYPE_INFO(0, data, IS_STRING, 0)
58 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_LONG, 0, "0")
59 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, dataIsURL, _IS_BOOL, 0, "false")
60 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, namespaceOrPrefix, IS_STRING, 0, "\"\"")
61 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, isPrefix, _IS_BOOL, 0, "false")
62 ZEND_END_ARG_INFO()
63 
64 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_OBJ_INFO_EX(arginfo_class_SimpleXMLElement_addChild, 0, 1, SimpleXMLElement, 1)
65 	ZEND_ARG_TYPE_INFO(0, qualifiedName, IS_STRING, 0)
66 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, value, IS_STRING, 1, "null")
67 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, namespace, IS_STRING, 1, "null")
68 ZEND_END_ARG_INFO()
69 
70 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_SimpleXMLElement_addAttribute, 0, 2, IS_VOID, 0)
71 	ZEND_ARG_TYPE_INFO(0, qualifiedName, IS_STRING, 0)
72 	ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0)
73 	ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, namespace, IS_STRING, 1, "null")
74 ZEND_END_ARG_INFO()
75 
76 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_SimpleXMLElement_getName, 0, 0, IS_STRING, 0)
77 ZEND_END_ARG_INFO()
78 
79 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_SimpleXMLElement___toString, 0, 0, IS_STRING, 0)
80 ZEND_END_ARG_INFO()
81 
82 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_SimpleXMLElement_count, 0, 0, IS_LONG, 0)
83 ZEND_END_ARG_INFO()
84 
85 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_SimpleXMLElement_rewind, 0, 0, IS_VOID, 0)
86 ZEND_END_ARG_INFO()
87 
88 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_SimpleXMLElement_valid, 0, 0, _IS_BOOL, 0)
89 ZEND_END_ARG_INFO()
90 
91 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_OBJ_INFO_EX(arginfo_class_SimpleXMLElement_current, 0, 0, SimpleXMLElement, 0)
92 ZEND_END_ARG_INFO()
93 
94 #define arginfo_class_SimpleXMLElement_key arginfo_class_SimpleXMLElement_getName
95 
96 #define arginfo_class_SimpleXMLElement_next arginfo_class_SimpleXMLElement_rewind
97 
98 #define arginfo_class_SimpleXMLElement_hasChildren arginfo_class_SimpleXMLElement_valid
99 
100 ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_OBJ_INFO_EX(arginfo_class_SimpleXMLElement_getChildren, 0, 0, SimpleXMLElement, 1)
101 ZEND_END_ARG_INFO()
102 
103 ZEND_FUNCTION(simplexml_load_file);
104 ZEND_FUNCTION(simplexml_load_string);
105 ZEND_FUNCTION(simplexml_import_dom);
106 ZEND_METHOD(SimpleXMLElement, xpath);
107 ZEND_METHOD(SimpleXMLElement, registerXPathNamespace);
108 ZEND_METHOD(SimpleXMLElement, asXML);
109 ZEND_METHOD(SimpleXMLElement, getNamespaces);
110 ZEND_METHOD(SimpleXMLElement, getDocNamespaces);
111 ZEND_METHOD(SimpleXMLElement, children);
112 ZEND_METHOD(SimpleXMLElement, attributes);
113 ZEND_METHOD(SimpleXMLElement, __construct);
114 ZEND_METHOD(SimpleXMLElement, addChild);
115 ZEND_METHOD(SimpleXMLElement, addAttribute);
116 ZEND_METHOD(SimpleXMLElement, getName);
117 ZEND_METHOD(SimpleXMLElement, __toString);
118 ZEND_METHOD(SimpleXMLElement, count);
119 ZEND_METHOD(SimpleXMLElement, rewind);
120 ZEND_METHOD(SimpleXMLElement, valid);
121 ZEND_METHOD(SimpleXMLElement, current);
122 ZEND_METHOD(SimpleXMLElement, key);
123 ZEND_METHOD(SimpleXMLElement, next);
124 ZEND_METHOD(SimpleXMLElement, hasChildren);
125 ZEND_METHOD(SimpleXMLElement, getChildren);
126 
127 static const zend_function_entry ext_functions[] = {
128 	ZEND_FE(simplexml_load_file, arginfo_simplexml_load_file)
129 	ZEND_FE(simplexml_load_string, arginfo_simplexml_load_string)
130 	ZEND_FE(simplexml_import_dom, arginfo_simplexml_import_dom)
131 	ZEND_FE_END
132 };
133 
134 static const zend_function_entry class_SimpleXMLElement_methods[] = {
135 	ZEND_ME(SimpleXMLElement, xpath, arginfo_class_SimpleXMLElement_xpath, ZEND_ACC_PUBLIC)
136 	ZEND_ME(SimpleXMLElement, registerXPathNamespace, arginfo_class_SimpleXMLElement_registerXPathNamespace, ZEND_ACC_PUBLIC)
137 	ZEND_ME(SimpleXMLElement, asXML, arginfo_class_SimpleXMLElement_asXML, ZEND_ACC_PUBLIC)
138 	ZEND_RAW_FENTRY("saveXML", zim_SimpleXMLElement_asXML, arginfo_class_SimpleXMLElement_saveXML, ZEND_ACC_PUBLIC, NULL, NULL)
139 	ZEND_ME(SimpleXMLElement, getNamespaces, arginfo_class_SimpleXMLElement_getNamespaces, ZEND_ACC_PUBLIC)
140 	ZEND_ME(SimpleXMLElement, getDocNamespaces, arginfo_class_SimpleXMLElement_getDocNamespaces, ZEND_ACC_PUBLIC)
141 	ZEND_ME(SimpleXMLElement, children, arginfo_class_SimpleXMLElement_children, ZEND_ACC_PUBLIC)
142 	ZEND_ME(SimpleXMLElement, attributes, arginfo_class_SimpleXMLElement_attributes, ZEND_ACC_PUBLIC)
143 	ZEND_ME(SimpleXMLElement, __construct, arginfo_class_SimpleXMLElement___construct, ZEND_ACC_PUBLIC)
144 	ZEND_ME(SimpleXMLElement, addChild, arginfo_class_SimpleXMLElement_addChild, ZEND_ACC_PUBLIC)
145 	ZEND_ME(SimpleXMLElement, addAttribute, arginfo_class_SimpleXMLElement_addAttribute, ZEND_ACC_PUBLIC)
146 	ZEND_ME(SimpleXMLElement, getName, arginfo_class_SimpleXMLElement_getName, ZEND_ACC_PUBLIC)
147 	ZEND_ME(SimpleXMLElement, __toString, arginfo_class_SimpleXMLElement___toString, ZEND_ACC_PUBLIC)
148 	ZEND_ME(SimpleXMLElement, count, arginfo_class_SimpleXMLElement_count, ZEND_ACC_PUBLIC)
149 	ZEND_ME(SimpleXMLElement, rewind, arginfo_class_SimpleXMLElement_rewind, ZEND_ACC_PUBLIC)
150 	ZEND_ME(SimpleXMLElement, valid, arginfo_class_SimpleXMLElement_valid, ZEND_ACC_PUBLIC)
151 	ZEND_ME(SimpleXMLElement, current, arginfo_class_SimpleXMLElement_current, ZEND_ACC_PUBLIC)
152 	ZEND_ME(SimpleXMLElement, key, arginfo_class_SimpleXMLElement_key, ZEND_ACC_PUBLIC)
153 	ZEND_ME(SimpleXMLElement, next, arginfo_class_SimpleXMLElement_next, ZEND_ACC_PUBLIC)
154 	ZEND_ME(SimpleXMLElement, hasChildren, arginfo_class_SimpleXMLElement_hasChildren, ZEND_ACC_PUBLIC)
155 	ZEND_ME(SimpleXMLElement, getChildren, arginfo_class_SimpleXMLElement_getChildren, ZEND_ACC_PUBLIC)
156 	ZEND_FE_END
157 };
158 
register_class_SimpleXMLElement(zend_class_entry * class_entry_Stringable,zend_class_entry * class_entry_Countable,zend_class_entry * class_entry_RecursiveIterator)159 static zend_class_entry *register_class_SimpleXMLElement(zend_class_entry *class_entry_Stringable, zend_class_entry *class_entry_Countable, zend_class_entry *class_entry_RecursiveIterator)
160 {
161 	zend_class_entry ce, *class_entry;
162 
163 	INIT_CLASS_ENTRY(ce, "SimpleXMLElement", class_SimpleXMLElement_methods);
164 	class_entry = zend_register_internal_class_with_flags(&ce, NULL, ZEND_ACC_NOT_SERIALIZABLE);
165 	zend_class_implements(class_entry, 3, class_entry_Stringable, class_entry_Countable, class_entry_RecursiveIterator);
166 
167 	return class_entry;
168 }
169 
register_class_SimpleXMLIterator(zend_class_entry * class_entry_SimpleXMLElement)170 static zend_class_entry *register_class_SimpleXMLIterator(zend_class_entry *class_entry_SimpleXMLElement)
171 {
172 	zend_class_entry ce, *class_entry;
173 
174 	INIT_CLASS_ENTRY(ce, "SimpleXMLIterator", NULL);
175 	class_entry = zend_register_internal_class_with_flags(&ce, class_entry_SimpleXMLElement, 0);
176 
177 	return class_entry;
178 }
179