Back to index

php5  5.3.10
Classes | Defines | Typedefs | Functions | Variables
php_xmlreader.h File Reference
#include "ext/libxml/php_libxml.h"
#include <libxml/xmlreader.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _xmlreader_object

Defines

#define phpext_xmlreader_ptr   &xmlreader_module_entry
#define REGISTER_XMLREADER_CLASS_CONST_LONG(const_name, value)   zend_declare_class_constant_long(xmlreader_class_entry, const_name, sizeof(const_name)-1, (long)value TSRMLS_CC);
#define XMLREADER_G(v)   (xmlreader_globals.v)

Typedefs

typedef struct _xmlreader_object xmlreader_object

Functions

 PHP_MINIT_FUNCTION (xmlreader)
 PHP_MSHUTDOWN_FUNCTION (xmlreader)
 PHP_MINFO_FUNCTION (xmlreader)

Variables

zend_module_entry xmlreader_module_entry

Class Documentation

struct _xmlreader_object

Definition at line 34 of file php_xmlreader.h.

Collaboration diagram for _xmlreader_object:
Class Members
zend_object_handle handle
xmlParserInputBufferPtr input
HashTable * prop_handler
xmlTextReaderPtr ptr
void * schema
zend_object std

Define Documentation

Definition at line 25 of file php_xmlreader.h.

#define REGISTER_XMLREADER_CLASS_CONST_LONG (   const_name,
  value 
)    zend_declare_class_constant_long(xmlreader_class_entry, const_name, sizeof(const_name)-1, (long)value TSRMLS_CC);

Definition at line 48 of file php_xmlreader.h.

#define XMLREADER_G (   v)    (xmlreader_globals.v)

Definition at line 54 of file php_xmlreader.h.


Typedef Documentation


Function Documentation

PHP_MINFO_FUNCTION ( xmlreader  )

Definition at line 1393 of file php_xmlreader.c.

Here is the call graph for this function:

PHP_MINIT_FUNCTION ( xmlreader  )

Definition at line 1314 of file php_xmlreader.c.

{
       
       zend_class_entry ce;
       
       memcpy(&xmlreader_object_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
       xmlreader_object_handlers.read_property = xmlreader_read_property;
       xmlreader_object_handlers.write_property = xmlreader_write_property;
       xmlreader_object_handlers.get_property_ptr_ptr = xmlreader_get_property_ptr_ptr;

       INIT_CLASS_ENTRY(ce, "XMLReader", xmlreader_functions);
       ce.create_object = xmlreader_objects_new;
       xmlreader_class_entry = zend_register_internal_class(&ce TSRMLS_CC);

       zend_hash_init(&xmlreader_prop_handlers, 0, NULL, NULL, 1);
       xmlreader_register_prop_handler(&xmlreader_prop_handlers, "attributeCount", xmlTextReaderAttributeCount, NULL, IS_LONG TSRMLS_CC);
       xmlreader_register_prop_handler(&xmlreader_prop_handlers, "baseURI", NULL, xmlTextReaderConstBaseUri, IS_STRING TSRMLS_CC);
       xmlreader_register_prop_handler(&xmlreader_prop_handlers, "depth", xmlTextReaderDepth, NULL, IS_LONG TSRMLS_CC);
       xmlreader_register_prop_handler(&xmlreader_prop_handlers, "hasAttributes", xmlTextReaderHasAttributes, NULL, IS_BOOL TSRMLS_CC);
       xmlreader_register_prop_handler(&xmlreader_prop_handlers, "hasValue", xmlTextReaderHasValue, NULL, IS_BOOL TSRMLS_CC);
       xmlreader_register_prop_handler(&xmlreader_prop_handlers, "isDefault", xmlTextReaderIsDefault, NULL, IS_BOOL TSRMLS_CC);
       xmlreader_register_prop_handler(&xmlreader_prop_handlers, "isEmptyElement", xmlTextReaderIsEmptyElement, NULL, IS_BOOL TSRMLS_CC);
       xmlreader_register_prop_handler(&xmlreader_prop_handlers, "localName", NULL, xmlTextReaderConstLocalName, IS_STRING TSRMLS_CC);
       xmlreader_register_prop_handler(&xmlreader_prop_handlers, "name", NULL, xmlTextReaderConstName, IS_STRING TSRMLS_CC);
       xmlreader_register_prop_handler(&xmlreader_prop_handlers, "namespaceURI", NULL, xmlTextReaderConstNamespaceUri, IS_STRING TSRMLS_CC);
       xmlreader_register_prop_handler(&xmlreader_prop_handlers, "nodeType", xmlTextReaderNodeType, NULL, IS_LONG TSRMLS_CC);
       xmlreader_register_prop_handler(&xmlreader_prop_handlers, "prefix", NULL, xmlTextReaderConstPrefix, IS_STRING TSRMLS_CC);
       xmlreader_register_prop_handler(&xmlreader_prop_handlers, "value", NULL, xmlTextReaderConstValue, IS_STRING TSRMLS_CC);
       xmlreader_register_prop_handler(&xmlreader_prop_handlers, "xmlLang", NULL, xmlTextReaderConstXmlLang, IS_STRING TSRMLS_CC);

       /* Constants for NodeType - cannot define common types to share with dom as there are differences in these types */

       REGISTER_XMLREADER_CLASS_CONST_LONG("NONE",      XML_READER_TYPE_NONE);
       REGISTER_XMLREADER_CLASS_CONST_LONG("ELEMENT",   XML_READER_TYPE_ELEMENT);
       REGISTER_XMLREADER_CLASS_CONST_LONG("ATTRIBUTE", XML_READER_TYPE_ATTRIBUTE);
       REGISTER_XMLREADER_CLASS_CONST_LONG("TEXT",      XML_READER_TYPE_TEXT);
       REGISTER_XMLREADER_CLASS_CONST_LONG("CDATA",     XML_READER_TYPE_CDATA);
       REGISTER_XMLREADER_CLASS_CONST_LONG("ENTITY_REF",       XML_READER_TYPE_ENTITY_REFERENCE);
       REGISTER_XMLREADER_CLASS_CONST_LONG("ENTITY",    XML_READER_TYPE_ENTITY);
       REGISTER_XMLREADER_CLASS_CONST_LONG("PI", XML_READER_TYPE_PROCESSING_INSTRUCTION);
       REGISTER_XMLREADER_CLASS_CONST_LONG("COMMENT",   XML_READER_TYPE_COMMENT);
       REGISTER_XMLREADER_CLASS_CONST_LONG("DOC",       XML_READER_TYPE_DOCUMENT);
       REGISTER_XMLREADER_CLASS_CONST_LONG("DOC_TYPE",  XML_READER_TYPE_DOCUMENT_TYPE);
       REGISTER_XMLREADER_CLASS_CONST_LONG("DOC_FRAGMENT",     XML_READER_TYPE_DOCUMENT_FRAGMENT);
       REGISTER_XMLREADER_CLASS_CONST_LONG("NOTATION",  XML_READER_TYPE_NOTATION);
       REGISTER_XMLREADER_CLASS_CONST_LONG("WHITESPACE",       XML_READER_TYPE_WHITESPACE);
       REGISTER_XMLREADER_CLASS_CONST_LONG("SIGNIFICANT_WHITESPACE",  XML_READER_TYPE_SIGNIFICANT_WHITESPACE);
       REGISTER_XMLREADER_CLASS_CONST_LONG("END_ELEMENT",      XML_READER_TYPE_END_ELEMENT);
       REGISTER_XMLREADER_CLASS_CONST_LONG("END_ENTITY",       XML_READER_TYPE_END_ENTITY);
       REGISTER_XMLREADER_CLASS_CONST_LONG("XML_DECLARATION",  XML_READER_TYPE_XML_DECLARATION);

       /* Constants for Parser options */
       REGISTER_XMLREADER_CLASS_CONST_LONG("LOADDTD",   XML_PARSER_LOADDTD);
       REGISTER_XMLREADER_CLASS_CONST_LONG("DEFAULTATTRS",     XML_PARSER_DEFAULTATTRS);
       REGISTER_XMLREADER_CLASS_CONST_LONG("VALIDATE",  XML_PARSER_VALIDATE);
       REGISTER_XMLREADER_CLASS_CONST_LONG("SUBST_ENTITIES",   XML_PARSER_SUBST_ENTITIES);

       /* Constants for Errors when loading - not yet used until we implement custom error handling
       REGISTER_XMLREADER_CLASS_CONST_LONG("VALIDITY_WARNING",        XML_PARSER_SEVERITY_VALIDITY_WARNING,     CONST_CS | CONST_PERSISTENT);
       REGISTER_XMLREADER_CLASS_CONST_LONG("VALIDITY_ERROR",          XML_PARSER_SEVERITY_VALIDITY_ERROR,              CONST_CS | CONST_PERSISTENT);
       REGISTER_XMLREADER_CLASS_CONST_LONG("WARNING",                        XML_PARSER_SEVERITY_WARNING,                     CONST_CS | CONST_PERSISTENT);
       REGISTER_XMLREADER_CLASS_CONST_LONG("ERROR",                          XML_PARSER_SEVERITY_ERROR,                       CONST_CS | CONST_PERSISTENT);
       */

       return SUCCESS;
}

Here is the call graph for this function:

PHP_MSHUTDOWN_FUNCTION ( xmlreader  )

Definition at line 1384 of file php_xmlreader.c.

Here is the call graph for this function:


Variable Documentation

zend_module_entry xmlreader_module_entry

Definition at line 328 of file php_xmlreader.c.