123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152 |
- /*
- +----------------------------------------------------------------------+
- | Vtiful Extension |
- +----------------------------------------------------------------------+
- | Copyright (c) 2017-2017 The Viest |
- +----------------------------------------------------------------------+
- | http://www.vtiful.com |
- +----------------------------------------------------------------------+
- | Author: viest <[email protected]> |
- +----------------------------------------------------------------------+
- */
- #ifdef HAVE_CONFIG_H
- #include "config.h"
- #endif
- #include "php.h"
- #include "php_ini.h"
- #include "php_vtiful.h"
- #include "ext/standard/info.h"
- #include "kernel/excel.h"
- #include "kernel/exception.h"
- PHP_MINIT_FUNCTION(vtiful)
- {
- /* If you have INI entries, uncomment these lines
- REGISTER_INI_ENTRIES();
- */
- VTIFUL_STARTUP_MODULE(vtiful_exception);
- VTIFUL_STARTUP_MODULE(excel);
- le_vtiful = zend_register_list_destructors_ex(_php_vtiful_excel_close, NULL, "vtiful", module_number);
- return SUCCESS;
- }
- /* }}} */
- /* {{{ PHP_MSHUTDOWN_FUNCTION
- */
- PHP_MSHUTDOWN_FUNCTION(vtiful)
- {
- /* uncomment this line if you have INI entries
- UNREGISTER_INI_ENTRIES();
- */
- return SUCCESS;
- }
- /* }}} */
- /* Remove if there's nothing to do at request start */
- /* {{{ PHP_RINIT_FUNCTION
- */
- PHP_RINIT_FUNCTION(vtiful)
- {
- #if defined(COMPILE_DL_VTIFUL) && defined(ZTS)
- ZEND_TSRMLS_CACHE_UPDATE();
- #endif
- return SUCCESS;
- }
- /* }}} */
- /* Remove if there's nothing to do at request end */
- /* {{{ PHP_RSHUTDOWN_FUNCTION
- */
- PHP_RSHUTDOWN_FUNCTION(vtiful)
- {
- return SUCCESS;
- }
- /* }}} */
- /* {{{ PHP_MINFO_FUNCTION
- */
- PHP_MINFO_FUNCTION(vtiful)
- {
- php_info_print_table_start();
- php_info_print_table_header(2, "vtiful support", "enabled");
- php_info_print_table_end();
- /* Remove comments if you have entries in php.ini
- DISPLAY_INI_ENTRIES();
- */
- }
- /* }}} */
- /* {{{ _php_fss_close
- *
- * List destructor for FSS handles
- */
- static void _php_vtiful_excel_close(zend_resource *rsrc TSRMLS_DC)
- {
- // int i;
- // fss_resource_t * res = (fss_resource_t *)rsrc->ptr;
- // /* Destroy the replace strings */
- // for (i = 0; i < res->replace_size; i++) {
- // if (res->replace[i]) {
- // zval_ptr_dtor(res->replace[i]);
- // }
- // }
- // /* Destroy the kwset structure */
- // kwsfree(res->set);
- // /* Destroy the resource structure itself */
- // efree(res);
- }
- /* }}} */
- /* {{{ vtiful_functions[]
- *
- * Every user visible function must have an entry in vtiful_functions[].
- */
- const zend_function_entry vtiful_functions[] = {
- PHP_FE_END
- };
- /* }}} */
- /* {{{ vtiful_module_entry
- */
- zend_module_entry vtiful_module_entry = {
- STANDARD_MODULE_HEADER,
- "vtiful",
- vtiful_functions,
- PHP_MINIT(vtiful),
- PHP_MSHUTDOWN(vtiful),
- PHP_RINIT(vtiful), /* Replace with NULL if there's nothing to do at request start */
- PHP_RSHUTDOWN(vtiful), /* Replace with NULL if there's nothing to do at request end */
- PHP_MINFO(vtiful),
- PHP_VTIFUL_VERSION,
- STANDARD_MODULE_PROPERTIES
- };
- /* }}} */
- #ifdef COMPILE_DL_VTIFUL
- #ifdef ZTS
- ZEND_TSRMLS_CACHE_DEFINE();
- #endif
- ZEND_GET_MODULE(vtiful)
- #endif
- /*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: noet sw=4 ts=4 fdm=marker
- * vim<600: noet sw=4 ts=4
- */
|