sixd Wed Jul 16 23:54:42 2008 UTC Added files: /php-src/ext/oci8/tests reflection2.phpt
Modified files: /php-src/ext/oci8 oci8.c /php-src/ext/oci8/tests reflection1.phpt Log: Add LOB & Collection class parameter reflection
http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/oci8.c?r1=1.351&r2=1.352&diff_format=u Index: php-src/ext/oci8/oci8.c diff -u php-src/ext/oci8/oci8.c:1.351 php-src/ext/oci8/oci8.c:1.352 --- php-src/ext/oci8/oci8.c:1.351 Wed Jul 16 22:14:02 2008 +++ php-src/ext/oci8/oci8.c Wed Jul 16 23:54:42 2008 @@ -26,7 +26,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: oci8.c,v 1.351 2008/07/16 22:14:02 sixd Exp $ */ +/* $Id: oci8.c,v 1.352 2008/07/16 23:54:42 sixd Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -104,7 +104,7 @@ #endif /* COMPILE_DL */ /* }}} */ -/* {{{ arginfo */ +/* {{{ Function arginfo */ static ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_define_by_name, 0, 0, 3) ZEND_ARG_INFO(0, statement_resource) @@ -223,7 +223,7 @@ static ZEND_BEGIN_ARG_INFO_EX(arginfo_ocisetbufferinglob, 0, 0, 2) ZEND_ARG_INFO(0, lob_descriptor) - ZEND_ARG_INFO(0, flag) + ZEND_ARG_INFO(0, mode) ZEND_END_ARG_INFO() static @@ -467,7 +467,7 @@ ZEND_END_ARG_INFO() static -ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_collection_append, 0, 0, ) +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_collection_append, 0, 0, 2) ZEND_ARG_INFO(0, collection) ZEND_ARG_INFO(0, value) ZEND_END_ARG_INFO() @@ -504,7 +504,7 @@ static ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_collection_trim, 0, 0, 2) ZEND_ARG_INFO(0, collection) - ZEND_ARG_INFO(0, num) + ZEND_ARG_INFO(0, number) ZEND_END_ARG_INFO() static @@ -515,6 +515,147 @@ ZEND_END_ARG_INFO() /* }}} */ +/* {{{ LOB Method arginfo */ +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_lob_save_method, 0, 0, 1) + ZEND_ARG_INFO(0, data) + ZEND_ARG_INFO(0, offset) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_lob_import_method, 0, 0, 1) + ZEND_ARG_INFO(0, filename) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_oci_lob_load_method, 0) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_lob_read_method, 0, 0, 1) + ZEND_ARG_INFO(0, length) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_oci_lob_eof_method, 0) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_oci_lob_tell_method, 0) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_oci_lob_rewind_method, 0) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_lob_seek_method, 0, 0, 1) + ZEND_ARG_INFO(0, offset) + ZEND_ARG_INFO(0, whence) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_oci_lob_size_method, 0) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_lob_write_method, 0, 0, 1) + ZEND_ARG_INFO(0, string) + ZEND_ARG_INFO(0, length) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_lob_append_method, 0, 0, 1) + ZEND_ARG_INFO(0, lob_descriptor_from) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_lob_truncate_method, 0, 0, 0) + ZEND_ARG_INFO(0, length) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_lob_erase_method, 0, 0, 0) + ZEND_ARG_INFO(0, offset) + ZEND_ARG_INFO(0, length) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_lob_flush_method, 0, 0, 0) + ZEND_ARG_INFO(0, flag) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_lob_setbuffering_method, 0, 0, 1) + ZEND_ARG_INFO(0, mode) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_oci_lob_getbuffering_method, 0) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_lob_export_method, 0, 0, 1) + ZEND_ARG_INFO(0, filename) + ZEND_ARG_INFO(0, start) + ZEND_ARG_INFO(0, length) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_lob_write_temporary_method, 0, 0, 1) + ZEND_ARG_INFO(0, data) + ZEND_ARG_INFO(0, type) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_oci_lob_close_method, 0) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_oci_free_descriptor_method, 0) +ZEND_END_ARG_INFO() +/* }}} */ + +/* {{{ Collection Method arginfo */ +static +ZEND_BEGIN_ARG_INFO(arginfo_oci_collection_free_method, 0) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_collection_append_method, 0, 0, 1) + ZEND_ARG_INFO(0, value) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_collection_element_get_method, 0, 0, 1) + ZEND_ARG_INFO(0, index) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_collection_assign_method, 0, 0, 1) + ZEND_ARG_INFO(0, collection_from) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_collection_element_assign_method, 0, 0, 2) + ZEND_ARG_INFO(0, index) + ZEND_ARG_INFO(0, value) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_oci_collection_size_method, 0) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_oci_collection_max_method, 0) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_oci_collection_trim_method, 0, 0, 1) + ZEND_ARG_INFO(0, number) +ZEND_END_ARG_INFO() +/* }}} */ + /* {{{ extension function prototypes */ PHP_FUNCTION(oci_bind_by_name); @@ -712,40 +853,40 @@ }; static const zend_function_entry php_oci_lob_class_functions[] = { - PHP_FALIAS(load, oci_lob_load, NULL) - PHP_FALIAS(tell, oci_lob_tell, NULL) - PHP_FALIAS(truncate, oci_lob_truncate, NULL) - PHP_FALIAS(erase, oci_lob_erase, NULL) - PHP_FALIAS(flush, oci_lob_flush, NULL) - PHP_FALIAS(setbuffering,ocisetbufferinglob, NULL) - PHP_FALIAS(getbuffering,ocigetbufferinglob, NULL) - PHP_FALIAS(rewind, oci_lob_rewind, NULL) - PHP_FALIAS(read, oci_lob_read, NULL) - PHP_FALIAS(eof, oci_lob_eof, NULL) - PHP_FALIAS(seek, oci_lob_seek, NULL) - PHP_FALIAS(write, oci_lob_write, NULL) - PHP_FALIAS(append, oci_lob_append, NULL) - PHP_FALIAS(size, oci_lob_size, NULL) - PHP_FALIAS(writetofile, oci_lob_export, NULL) - PHP_FALIAS(export, oci_lob_export, NULL) - PHP_FALIAS(import, oci_lob_import, NULL) - PHP_FALIAS(writetemporary, oci_lob_write_temporary, NULL) - PHP_FALIAS(close, oci_lob_close, NULL) - PHP_FALIAS(save, oci_lob_save, NULL) - PHP_FALIAS(savefile, oci_lob_import, NULL) - PHP_FALIAS(free, oci_free_descriptor, NULL) + PHP_FALIAS(load, oci_lob_load, arginfo_oci_lob_load_method) + PHP_FALIAS(tell, oci_lob_tell, arginfo_oci_lob_tell_method) + PHP_FALIAS(truncate, oci_lob_truncate, arginfo_oci_lob_truncate_method) + PHP_FALIAS(erase, oci_lob_erase, arginfo_oci_lob_erase_method) + PHP_FALIAS(flush, oci_lob_flush, arginfo_oci_lob_flush_method) + PHP_FALIAS(setbuffering,ocisetbufferinglob, arginfo_oci_lob_setbuffering_method) + PHP_FALIAS(getbuffering,ocigetbufferinglob, arginfo_oci_lob_getbuffering_method) + PHP_FALIAS(rewind, oci_lob_rewind, arginfo_oci_lob_rewind_method) + PHP_FALIAS(read, oci_lob_read, arginfo_oci_lob_read_method) + PHP_FALIAS(eof, oci_lob_eof, arginfo_oci_lob_eof_method) + PHP_FALIAS(seek, oci_lob_seek, arginfo_oci_lob_seek_method) + PHP_FALIAS(write, oci_lob_write, arginfo_oci_lob_write_method) + PHP_FALIAS(append, oci_lob_append, arginfo_oci_lob_append_method) + PHP_FALIAS(size, oci_lob_size, arginfo_oci_lob_size_method) + PHP_FALIAS(writetofile, oci_lob_export, arginfo_oci_lob_export_method) + PHP_FALIAS(export, oci_lob_export, arginfo_oci_lob_export_method) + PHP_FALIAS(import, oci_lob_import, arginfo_oci_lob_import_method) + PHP_FALIAS(writetemporary, oci_lob_write_temporary, arginfo_oci_lob_write_temporary_method) + PHP_FALIAS(close, oci_lob_close, arginfo_oci_lob_close_method) + PHP_FALIAS(save, oci_lob_save, arginfo_oci_lob_save_method) + PHP_FALIAS(savefile, oci_lob_import, arginfo_oci_lob_import_method) + PHP_FALIAS(free, oci_free_descriptor, arginfo_oci_free_descriptor_method) {NULL,NULL,NULL} }; static const zend_function_entry php_oci_coll_class_functions[] = { - PHP_FALIAS(append, oci_collection_append, NULL) - PHP_FALIAS(getelem, oci_collection_element_get, NULL) - PHP_FALIAS(assignelem, oci_collection_element_assign, NULL) - PHP_FALIAS(assign, oci_collection_assign, NULL) - PHP_FALIAS(size, oci_collection_size, NULL) - PHP_FALIAS(max, oci_collection_max, NULL) - PHP_FALIAS(trim, oci_collection_trim, NULL) - PHP_FALIAS(free, oci_free_collection, NULL) + PHP_FALIAS(append, oci_collection_append, arginfo_oci_collection_append_method) + PHP_FALIAS(getelem, oci_collection_element_get, arginfo_oci_collection_element_get_method) + PHP_FALIAS(assignelem, oci_collection_element_assign, arginfo_oci_collection_element_assign_method) + PHP_FALIAS(assign, oci_collection_assign, arginfo_oci_collection_assign_method) + PHP_FALIAS(size, oci_collection_size, arginfo_oci_collection_size_method) + PHP_FALIAS(max, oci_collection_max, arginfo_oci_collection_max_method) + PHP_FALIAS(trim, oci_collection_trim, arginfo_oci_collection_trim_method) + PHP_FALIAS(free, oci_free_collection, arginfo_oci_collection_free_method) {NULL,NULL,NULL} }; @@ -1028,7 +1169,7 @@ php_info_print_table_start(); php_info_print_table_row(2, "OCI8 Support", "enabled"); php_info_print_table_row(2, "Version", PHP_OCI8_VERSION); - php_info_print_table_row(2, "Revision", "$Revision: 1.351 $"); + php_info_print_table_row(2, "Revision", "$Revision: 1.352 $"); snprintf(buf, sizeof(buf), "%ld", OCI_G(num_persistent)); php_info_print_table_row(2, "Active Persistent Connections", buf); http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/tests/reflection1.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/oci8/tests/reflection1.phpt diff -u php-src/ext/oci8/tests/reflection1.phpt:1.1 php-src/ext/oci8/tests/reflection1.phpt:1.2 --- php-src/ext/oci8/tests/reflection1.phpt:1.1 Wed Jul 16 22:14:03 2008 +++ php-src/ext/oci8/tests/reflection1.phpt Wed Jul 16 23:54:42 2008 @@ -487,7 +487,7 @@ - Parameters [2] { Parameter #0 [ <required> $lob_descriptor ] - Parameter #1 [ <required> $flag ] + Parameter #1 [ <required> $mode ] } } @@ -608,8 +608,8 @@ Function [ <internal:oci8> function oci_collection_append ] { - Parameters [2] { - Parameter #0 [ <optional> $collection ] - Parameter #1 [ <optional> $value ] + Parameter #0 [ <required> $collection ] + Parameter #1 [ <required> $value ] } } @@ -656,7 +656,7 @@ - Parameters [2] { Parameter #0 [ <required> $collection ] - Parameter #1 [ <required> $num ] + Parameter #1 [ <required> $number ] } } @@ -1005,8 +1005,8 @@ Function [ <internal:oci8> function ocicollappend ] { - Parameters [2] { - Parameter #0 [ <optional> $collection ] - Parameter #1 [ <optional> $value ] + Parameter #0 [ <required> $collection ] + Parameter #1 [ <required> $value ] } } @@ -1045,7 +1045,7 @@ - Parameters [2] { Parameter #0 [ <required> $collection ] - Parameter #1 [ <required> $num ] + Parameter #1 [ <required> $number ] } } http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/tests/reflection2.phpt?view=markup&rev=1.1 Index: php-src/ext/oci8/tests/reflection2.phpt +++ php-src/ext/oci8/tests/reflection2.phpt --TEST-- Test OCI8 LOB & Collection Class Reflection --SKIPIF-- <?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); ?> --FILE-- <?php reflection::export(new reflectionclass('OCI-Lob')); reflection::export(new reflectionclass('OCI-Collection')); ?> ===DONE=== <?php exit(0); ?> --EXPECTF-- Class [ <internal:oci8> class OCI-Lob ] { - Constants [0] { } - Static properties [0] { } - Static methods [0] { } - Properties [0] { } - Methods [22] { Method [ <internal:oci8> public method load ] { - Parameters [0] { } } Method [ <internal:oci8> public method tell ] { - Parameters [0] { } } Method [ <internal:oci8> public method truncate ] { - Parameters [1] { Parameter #0 [ <optional> $length ] } } Method [ <internal:oci8> public method erase ] { - Parameters [2] { Parameter #0 [ <optional> $offset ] Parameter #1 [ <optional> $length ] } } Method [ <internal:oci8> public method flush ] { - Parameters [1] { Parameter #0 [ <optional> $flag ] } } Method [ <internal:oci8> public method setbuffering ] { - Parameters [1] { Parameter #0 [ <required> $mode ] } } Method [ <internal:oci8> public method getbuffering ] { - Parameters [0] { } } Method [ <internal:oci8> public method rewind ] { - Parameters [0] { } } Method [ <internal:oci8> public method read ] { - Parameters [1] { Parameter #0 [ <required> $length ] } } Method [ <internal:oci8> public method eof ] { - Parameters [0] { } } Method [ <internal:oci8> public method seek ] { - Parameters [2] { Parameter #0 [ <required> $offset ] Parameter #1 [ <optional> $whence ] } } Method [ <internal:oci8> public method write ] { - Parameters [2] { Parameter #0 [ <required> $string ] Parameter #1 [ <optional> $length ] } } Method [ <internal:oci8> public method append ] { - Parameters [1] { Parameter #0 [ <required> $lob_descriptor_from ] } } Method [ <internal:oci8> public method size ] { - Parameters [0] { } } Method [ <internal:oci8> public method writetofile ] { - Parameters [3] { Parameter #0 [ <required> $filename ] Parameter #1 [ <optional> $start ] Parameter #2 [ <optional> $length ] } } Method [ <internal:oci8> public method export ] { - Parameters [3] { Parameter #0 [ <required> $filename ] Parameter #1 [ <optional> $start ] Parameter #2 [ <optional> $length ] } } Method [ <internal:oci8> public method import ] { - Parameters [1] { Parameter #0 [ <required> $filename ] } } Method [ <internal:oci8> public method writetemporary ] { - Parameters [2] { Parameter #0 [ <required> $data ] Parameter #1 [ <optional> $type ] } } Method [ <internal:oci8> public method close ] { - Parameters [0] { } } Method [ <internal:oci8> public method save ] { - Parameters [2] { Parameter #0 [ <required> $data ] Parameter #1 [ <optional> $offset ] } } Method [ <internal:oci8> public method savefile ] { - Parameters [1] { Parameter #0 [ <required> $filename ] } } Method [ <internal:oci8> public method free ] { - Parameters [0] { } } } } Class [ <internal:oci8> class OCI-Collection ] { - Constants [0] { } - Static properties [0] { } - Static methods [0] { } - Properties [0] { } - Methods [8] { Method [ <internal:oci8> public method append ] { - Parameters [1] { Parameter #0 [ <required> $value ] } } Method [ <internal:oci8> public method getelem ] { - Parameters [1] { Parameter #0 [ <required> $index ] } } Method [ <internal:oci8> public method assignelem ] { - Parameters [2] { Parameter #0 [ <required> $index ] Parameter #1 [ <required> $value ] } } Method [ <internal:oci8> public method assign ] { - Parameters [1] { Parameter #0 [ <required> $collection_from ] } } Method [ <internal:oci8> public method size ] { - Parameters [0] { } } Method [ <internal:oci8> public method max ] { - Parameters [0] { } } Method [ <internal:oci8> public method trim ] { - Parameters [1] { Parameter #0 [ <required> $number ] } } Method [ <internal:oci8> public method free ] { - Parameters [0] { } } } } ===DONE===
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php