Lines Matching refs:private_data
37 …_libxml_private_data_header *php_dom_libxml_private_data_header(php_dom_private_data *private_data) in php_dom_libxml_private_data_header() argument
39 return private_data == NULL ? NULL : &private_data->header; in php_dom_libxml_private_data_header()
42 php_dom_libxml_ns_mapper *php_dom_ns_mapper_from_private(php_dom_private_data *private_data) in php_dom_ns_mapper_from_private() argument
44 return private_data == NULL ? NULL : &private_data->ns_mapper; in php_dom_ns_mapper_from_private()
49 php_dom_private_data *private_data = emalloc(sizeof(*private_data)); in php_dom_private_data_create() local
50 private_data->header.dtor = php_dom_libxml_private_data_destroy; in php_dom_private_data_create()
51 private_data->header.ns_hook = php_dom_libxml_private_data_ns_hook; in php_dom_private_data_create()
52 private_data->ns_mapper.html_ns = NULL; in php_dom_private_data_create()
53 private_data->ns_mapper.prefixless_xmlns_ns = NULL; in php_dom_private_data_create()
54 zend_hash_init(&private_data->ns_mapper.uri_to_prefix_map, 0, NULL, ZVAL_PTR_DTOR, false); in php_dom_private_data_create()
55 private_data->template_fragments = NULL; in php_dom_private_data_create()
56 return private_data; in php_dom_private_data_create()
73 static void php_dom_free_templated_content(php_dom_private_data *private_data, xmlNodePtr base) in php_dom_free_templated_content() argument
79 if (zend_hash_num_elements(private_data->template_fragments) > 0) { in php_dom_free_templated_content()
84 php_dom_remove_templated_content(private_data, current); in php_dom_free_templated_content()
94 void php_dom_add_templated_content(php_dom_private_data *private_data, const xmlNode *template_node… in php_dom_add_templated_content() argument
96 if (private_data->template_fragments == NULL) { in php_dom_add_templated_content()
97 ALLOC_HASHTABLE(private_data->template_fragments); in php_dom_add_templated_content()
98 zend_hash_init(private_data->template_fragments, 0, NULL, NULL, false); in php_dom_add_templated_content()
99 zend_hash_real_init_mixed(private_data->template_fragments); in php_dom_add_templated_content()
102 …zend_hash_index_add_new_ptr(private_data->template_fragments, dom_mangle_pointer_for_key(template_… in php_dom_add_templated_content()
105 xmlNodePtr php_dom_retrieve_templated_content(php_dom_private_data *private_data, const xmlNode *te… in php_dom_retrieve_templated_content() argument
107 if (private_data->template_fragments == NULL) { in php_dom_retrieve_templated_content()
111 …return zend_hash_index_find_ptr(private_data->template_fragments, dom_mangle_pointer_for_key(templ… in php_dom_retrieve_templated_content()
114 xmlNodePtr php_dom_ensure_templated_content(php_dom_private_data *private_data, xmlNodePtr template… in php_dom_ensure_templated_content() argument
116 xmlNodePtr result = php_dom_retrieve_templated_content(private_data, template_node); in php_dom_ensure_templated_content()
121 dom_add_element_ns_hook(private_data, template_node); in php_dom_ensure_templated_content()
122 php_dom_add_templated_content(private_data, template_node, result); in php_dom_ensure_templated_content()
128 void php_dom_remove_templated_content(php_dom_private_data *private_data, const xmlNode *template_n… in php_dom_remove_templated_content() argument
130 if (private_data->template_fragments != NULL) { in php_dom_remove_templated_content()
132 …zval *zv = zend_hash_index_find(private_data->template_fragments, dom_mangle_pointer_for_key(templ… in php_dom_remove_templated_content()
139 zend_hash_del_bucket(private_data->template_fragments, bucket); in php_dom_remove_templated_content()
140 php_dom_free_templated_content(private_data, node); in php_dom_remove_templated_content()
145 uint32_t php_dom_get_template_count(const php_dom_private_data *private_data) in php_dom_get_template_count() argument
147 if (private_data->template_fragments != NULL) { in php_dom_get_template_count()
148 return zend_hash_num_elements(private_data->template_fragments); in php_dom_get_template_count()
154 void dom_add_element_ns_hook(php_dom_private_data *private_data, xmlNodePtr element) in dom_add_element_ns_hook() argument
163 ns->_private = (void *) ((uintptr_t) private_data | LIBXML_NS_TAG_HOOK); in dom_add_element_ns_hook()