php_twig.h 1.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*
  2. +----------------------------------------------------------------------+
  3. | Twig Extension |
  4. +----------------------------------------------------------------------+
  5. | Copyright (c) 2011 Derick Rethans |
  6. +----------------------------------------------------------------------+
  7. | Redistribution and use in source and binary forms, with or without |
  8. | modification, are permitted provided that the conditions mentioned |
  9. | in the accompanying LICENSE file are met (BSD, revised). |
  10. +----------------------------------------------------------------------+
  11. | Author: Derick Rethans <derick@derickrethans.nl> |
  12. +----------------------------------------------------------------------+
  13. */
  14. #ifndef PHP_TWIG_H
  15. #define PHP_TWIG_H
  16. #define PHP_TWIG_VERSION "1.6.0"
  17. #include "php.h"
  18. extern zend_module_entry twig_module_entry;
  19. #define phpext_twig_ptr &twig_module_entry
  20. #ifdef PHP_WIN32
  21. #define PHP_TWIG_API __declspec(dllexport)
  22. #else
  23. #define PHP_TWIG_API
  24. #endif
  25. #ifdef ZTS
  26. #include "TSRM.h"
  27. #endif
  28. PHP_FUNCTION(twig_template_get_attributes);
  29. PHP_MINIT_FUNCTION(twig);
  30. PHP_MSHUTDOWN_FUNCTION(twig);
  31. PHP_RINIT_FUNCTION(twig);
  32. PHP_RSHUTDOWN_FUNCTION(twig);
  33. PHP_MINFO_FUNCTION(twig);
  34. #ifdef ZTS
  35. #define TWIG_G(v) TSRMG(twig_globals_id, zend_twig_globals *, v)
  36. #else
  37. #define TWIG_G(v) (twig_globals.v)
  38. #endif
  39. #endif