@@ -162,6 +162,11 @@ ZEND_END_ARG_INFO()
162162ZEND_BEGIN_ARG_INFO_EX (xls_open_sheet_arginfo , 0 , 0 , 1 )
163163 ZEND_ARG_INFO (0 , zs_sheet_name )
164164ZEND_END_ARG_INFO ()
165+
166+ ZEND_BEGIN_ARG_INFO_EX (xls_next_cell_callback_arginfo , 0 , 0 , 2 )
167+ ZEND_ARG_INFO (0 , fci )
168+ ZEND_ARG_INFO (0 , sheet_name )
169+ ZEND_END_ARG_INFO ()
165170/* }}} */
166171
167172/** {{{ \Vtiful\Kernel\xls::__construct(array $config)
@@ -728,11 +733,13 @@ PHP_METHOD(vtiful_xls, openFile)
728733 */
729734PHP_METHOD (vtiful_xls , openSheet )
730735{
736+ zend_long zl_flag = XLSXIOREAD_SKIP_NONE ;
731737 zend_string * zs_sheet_name = NULL ;
732738
733- ZEND_PARSE_PARAMETERS_START (0 , 1 )
739+ ZEND_PARSE_PARAMETERS_START (0 , 2 )
734740 Z_PARAM_OPTIONAL
735741 Z_PARAM_STR (zs_sheet_name )
742+ Z_PARAM_LONG (zl_flag )
736743 ZEND_PARSE_PARAMETERS_END ();
737744
738745 ZVAL_COPY (return_value , getThis ()) ;
@@ -743,7 +750,7 @@ PHP_METHOD(vtiful_xls, openSheet)
743750 RETURN_NULL ();
744751 }
745752
746- obj -> read_ptr .sheet_t = sheet_open (obj -> read_ptr .file_t , zs_sheet_name );
753+ obj -> read_ptr .sheet_t = sheet_open (obj -> read_ptr .file_t , zs_sheet_name , zl_flag );
747754}
748755/* }}} */
749756
@@ -837,11 +844,11 @@ zend_function_entry xls_methods[] = {
837844 PHP_ME (vtiful_xls , setRow , xls_set_row_arginfo , ZEND_ACC_PUBLIC )
838845
839846#ifdef ENABLE_READER
840- PHP_ME (vtiful_xls , openFile , xls_open_file_arginfo , ZEND_ACC_PUBLIC )
841- PHP_ME (vtiful_xls , openSheet , xls_open_sheet_arginfo , ZEND_ACC_PUBLIC )
842- PHP_ME (vtiful_xls , getSheetData , NULL , ZEND_ACC_PUBLIC )
843- PHP_ME (vtiful_xls , nextRow , NULL , ZEND_ACC_PUBLIC )
844- PHP_ME (vtiful_xls , nextCellCallback , NULL , ZEND_ACC_PUBLIC )
847+ PHP_ME (vtiful_xls , openFile , xls_open_file_arginfo , ZEND_ACC_PUBLIC )
848+ PHP_ME (vtiful_xls , openSheet , xls_open_sheet_arginfo , ZEND_ACC_PUBLIC )
849+ PHP_ME (vtiful_xls , getSheetData , NULL , ZEND_ACC_PUBLIC )
850+ PHP_ME (vtiful_xls , nextRow , NULL , ZEND_ACC_PUBLIC )
851+ PHP_ME (vtiful_xls , nextCellCallback , xls_next_cell_callback_arginfo , ZEND_ACC_PUBLIC )
845852#endif
846853
847854 PHP_FE_END
@@ -864,6 +871,10 @@ VTIFUL_STARTUP_FUNCTION(excel) {
864871 REGISTER_CLASS_PROPERTY_NULL (vtiful_xls_ce , V_XLS_COF , ZEND_ACC_PRIVATE );
865872 REGISTER_CLASS_PROPERTY_NULL (vtiful_xls_ce , V_XLS_FIL , ZEND_ACC_PRIVATE );
866873
874+ REGISTER_CLASS_CONST_LONG (vtiful_xls_ce , V_XLS_CONST_READ_SKIP_NONE , XLSXIOREAD_SKIP_NONE );
875+ REGISTER_CLASS_CONST_LONG (vtiful_xls_ce , V_XLS_CONST_READ_SKIP_EMPTY_ROW , XLSXIOREAD_SKIP_EMPTY_ROWS );
876+ REGISTER_CLASS_CONST_LONG (vtiful_xls_ce , V_XLS_CONST_READ_SKIP_EMPTY_CELLS , XLSXIOREAD_SKIP_EMPTY_CELLS );
877+
867878 REGISTER_CLASS_CONST_LONG (vtiful_xls_ce , V_XLS_CONST_READ_TYPE_INT , READ_TYPE_INT );
868879 REGISTER_CLASS_CONST_LONG (vtiful_xls_ce , V_XLS_CONST_READ_TYPE_DOUBLE , READ_TYPE_DOUBLE );
869880 REGISTER_CLASS_CONST_LONG (vtiful_xls_ce , V_XLS_CONST_READ_TYPE_STRING , READ_TYPE_STRING );
0 commit comments