excel.h 1.4 KB

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. +----------------------------------------------------------------------+
  3. | XlsWriter Extension |
  4. +----------------------------------------------------------------------+
  5. | Copyright (c) 2017-2018 The Viest |
  6. +----------------------------------------------------------------------+
  7. | http://www.viest.me |
  8. +----------------------------------------------------------------------+
  9. | Author: viest <[email protected]> |
  10. +----------------------------------------------------------------------+
  11. */
  12. #ifndef VTIFUL_XLS_H
  13. #define VTIFUL_XLS_H
  14. #define V_XLS_HANDLE "handle"
  15. #define V_XLS_FIL "fileName"
  16. #define V_XLS_COF "config"
  17. #define V_XLS_PAT "path"
  18. #define GET_CONFIG_PATH(dir_path_res, class_name, object) \
  19. do { \
  20. zval rv; \
  21. zval *_config = zend_read_property(class_name, object, ZEND_STRL(V_XLS_COF), 0, &rv); \
  22. (dir_path_res) = zend_hash_str_find(Z_ARRVAL_P(_config), ZEND_STRL(V_XLS_PAT)); \
  23. } while(0)
  24. extern zend_class_entry *vtiful_xls_ce;
  25. VTIFUL_STARTUP_FUNCTION(excel);
  26. #endif