php_xsl.h 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. /*
  2. +----------------------------------------------------------------------+
  3. | Copyright (c) The PHP Group |
  4. +----------------------------------------------------------------------+
  5. | This source file is subject to version 3.01 of the PHP license, |
  6. | that is bundled with this package in the file LICENSE, and is |
  7. | available through the world-wide-web at the following url: |
  8. | https://www.php.net/license/3_01.txt |
  9. | If you did not receive a copy of the PHP license and are unable to |
  10. | obtain it through the world-wide-web, please send a note to |
  11. | license@php.net so we can mail you a copy immediately. |
  12. +----------------------------------------------------------------------+
  13. | Author: |
  14. +----------------------------------------------------------------------+
  15. */
  16. #ifndef PHP_XSL_H
  17. #define PHP_XSL_H
  18. extern zend_module_entry xsl_module_entry;
  19. #define phpext_xsl_ptr &xsl_module_entry
  20. #include "php_version.h"
  21. #define PHP_XSL_VERSION PHP_VERSION
  22. #ifdef ZTS
  23. #include "TSRM.h"
  24. #endif
  25. #include <libxslt/xsltconfig.h>
  26. #include <libxslt/xsltInternals.h>
  27. #include <libxslt/xsltutils.h>
  28. #include <libxslt/transform.h>
  29. #include <libxslt/security.h>
  30. #ifdef HAVE_XSL_EXSLT
  31. #include <libexslt/exslt.h>
  32. #include <libexslt/exsltconfig.h>
  33. #endif
  34. #include "../dom/xml_common.h"
  35. #include <libxslt/extensions.h>
  36. #include <libxml/xpathInternals.h>
  37. #define XSL_SECPREF_NONE 0
  38. #define XSL_SECPREF_READ_FILE 2
  39. #define XSL_SECPREF_WRITE_FILE 4
  40. #define XSL_SECPREF_CREATE_DIRECTORY 8
  41. #define XSL_SECPREF_READ_NETWORK 16
  42. #define XSL_SECPREF_WRITE_NETWORK 32
  43. /* Default == disable all write access == XSL_SECPREF_WRITE_NETWORK | XSL_SECPREF_CREATE_DIRECTORY | XSL_SECPREF_WRITE_FILE */
  44. #define XSL_SECPREF_DEFAULT 44
  45. typedef struct _xsl_object {
  46. void *ptr;
  47. HashTable *prop_handler;
  48. zval handle;
  49. HashTable *parameter;
  50. int hasKeys;
  51. int registerPhpFunctions;
  52. HashTable *registered_phpfunctions;
  53. HashTable *node_list;
  54. php_libxml_node_object *doc;
  55. char *profiling;
  56. zend_long securityPrefs;
  57. int securityPrefsSet;
  58. zend_object std;
  59. } xsl_object;
  60. static inline xsl_object *php_xsl_fetch_object(zend_object *obj) {
  61. return (xsl_object *)((char*)(obj) - XtOffsetOf(xsl_object, std));
  62. }
  63. #define Z_XSL_P(zv) php_xsl_fetch_object(Z_OBJ_P((zv)))
  64. void php_xsl_set_object(zval *wrapper, void *obj);
  65. void xsl_objects_free_storage(zend_object *object);
  66. void php_xsl_create_object(xsltStylesheetPtr obj, zval *wrapper_in, zval *return_value );
  67. void xsl_ext_function_string_php(xmlXPathParserContextPtr ctxt, int nargs);
  68. void xsl_ext_function_object_php(xmlXPathParserContextPtr ctxt, int nargs);
  69. PHP_MINIT_FUNCTION(xsl);
  70. PHP_MSHUTDOWN_FUNCTION(xsl);
  71. PHP_RINIT_FUNCTION(xsl);
  72. PHP_RSHUTDOWN_FUNCTION(xsl);
  73. PHP_MINFO_FUNCTION(xsl);
  74. #endif /* PHP_XSL_H */