diff options
-rw-r--r-- | .gitignore | 7 | ||||
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | PHPINFO | 19 | ||||
-rw-r--r-- | REFLECTION | 826 | ||||
-rw-r--r-- | php-pecl-interbase.spec | 236 |
5 files changed, 1092 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1ab5c4f --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +package-*.xml +*.tgz +*.tar.gz +*.tar.xz +*.tar.xz.asc +*.src.rpm +*/*rpm diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..13af741 --- /dev/null +++ b/Makefile @@ -0,0 +1,4 @@ +SRCDIR := $(shell pwd) +NAME := $(shell basename $(SRCDIR)) +include ../../../common/Makefile + @@ -0,0 +1,19 @@ + +interbase + +Firebird/InterBase Support => dynamic +Interbase extension version => 1.0.0-dev +Compile-time Client Library Version => Firebird API version 30 +Run-time Client Library Version => LI-V6.3.4.33054 Firebird 3.0 + +Directive => Local Value => Master Value +ibase.allow_persistent => On => On +ibase.max_persistent => Unlimited => Unlimited +ibase.max_links => Unlimited => Unlimited +ibase.default_db => no value => no value +ibase.default_user => no value => no value +ibase.default_password => no value => no value +ibase.default_charset => no value => no value +ibase.timestampformat => %Y-%m-%d %H:%M:%S => %Y-%m-%d %H:%M:%S +ibase.dateformat => %Y-%m-%d => %Y-%m-%d +ibase.timeformat => %H:%M:%S => %H:%M:%S diff --git a/REFLECTION b/REFLECTION new file mode 100644 index 0000000..de2b94c --- /dev/null +++ b/REFLECTION @@ -0,0 +1,826 @@ +Extension [ <persistent> extension #32 interbase version 1.0.0-dev ] { + + - INI { + Entry [ ibase.allow_persistent <SYSTEM> ] + Current = '1' + } + Entry [ ibase.max_persistent <SYSTEM> ] + Current = '-1' + } + Entry [ ibase.max_links <SYSTEM> ] + Current = '-1' + } + Entry [ ibase.default_db <SYSTEM> ] + Current = '' + } + Entry [ ibase.default_user <ALL> ] + Current = '' + } + Entry [ ibase.default_password <ALL> ] + Current = '' + } + Entry [ ibase.default_charset <ALL> ] + Current = '' + } + Entry [ ibase.timestampformat <ALL> ] + Current = '%Y-%m-%d %H:%M:%S' + } + Entry [ ibase.dateformat <ALL> ] + Current = '%Y-%m-%d' + } + Entry [ ibase.timeformat <ALL> ] + Current = '%H:%M:%S' + } + } + + - Constants [66] { + Constant [ int IBASE_DEFAULT ] { 0 } + Constant [ int IBASE_CREATE ] { 0 } + Constant [ int IBASE_TEXT ] { 1 } + Constant [ int IBASE_FETCH_BLOBS ] { 1 } + Constant [ int IBASE_FETCH_ARRAYS ] { 2 } + Constant [ int IBASE_UNIXTIME ] { 4 } + Constant [ int IBASE_WRITE ] { 1 } + Constant [ int IBASE_READ ] { 2 } + Constant [ int IBASE_COMMITTED ] { 8 } + Constant [ int IBASE_CONSISTENCY ] { 16 } + Constant [ int IBASE_CONCURRENCY ] { 4 } + Constant [ int IBASE_REC_VERSION ] { 64 } + Constant [ int IBASE_REC_NO_VERSION ] { 32 } + Constant [ int IBASE_NOWAIT ] { 256 } + Constant [ int IBASE_WAIT ] { 128 } + Constant [ int IBASE_BKP_IGNORE_CHECKSUMS ] { 1 } + Constant [ int IBASE_BKP_IGNORE_LIMBO ] { 2 } + Constant [ int IBASE_BKP_METADATA_ONLY ] { 4 } + Constant [ int IBASE_BKP_NO_GARBAGE_COLLECT ] { 8 } + Constant [ int IBASE_BKP_OLD_DESCRIPTIONS ] { 16 } + Constant [ int IBASE_BKP_NON_TRANSPORTABLE ] { 32 } + Constant [ int IBASE_BKP_CONVERT ] { 64 } + Constant [ int IBASE_RES_DEACTIVATE_IDX ] { 256 } + Constant [ int IBASE_RES_NO_SHADOW ] { 512 } + Constant [ int IBASE_RES_NO_VALIDITY ] { 1024 } + Constant [ int IBASE_RES_ONE_AT_A_TIME ] { 2048 } + Constant [ int IBASE_RES_REPLACE ] { 4096 } + Constant [ int IBASE_RES_CREATE ] { 8192 } + Constant [ int IBASE_RES_USE_ALL_SPACE ] { 16384 } + Constant [ int IBASE_PRP_PAGE_BUFFERS ] { 5 } + Constant [ int IBASE_PRP_SWEEP_INTERVAL ] { 6 } + Constant [ int IBASE_PRP_SHUTDOWN_DB ] { 7 } + Constant [ int IBASE_PRP_DENY_NEW_TRANSACTIONS ] { 10 } + Constant [ int IBASE_PRP_DENY_NEW_ATTACHMENTS ] { 9 } + Constant [ int IBASE_PRP_RESERVE_SPACE ] { 11 } + Constant [ int IBASE_PRP_RES_USE_FULL ] { 35 } + Constant [ int IBASE_PRP_RES ] { 36 } + Constant [ int IBASE_PRP_WRITE_MODE ] { 12 } + Constant [ int IBASE_PRP_WM_ASYNC ] { 37 } + Constant [ int IBASE_PRP_WM_SYNC ] { 38 } + Constant [ int IBASE_PRP_ACCESS_MODE ] { 13 } + Constant [ int IBASE_PRP_AM_READONLY ] { 39 } + Constant [ int IBASE_PRP_AM_READWRITE ] { 40 } + Constant [ int IBASE_PRP_SET_SQL_DIALECT ] { 14 } + Constant [ int IBASE_PRP_ACTIVATE ] { 256 } + Constant [ int IBASE_PRP_DB_ONLINE ] { 512 } + Constant [ int IBASE_RPR_CHECK_DB ] { 16 } + Constant [ int IBASE_RPR_IGNORE_CHECKSUM ] { 32 } + Constant [ int IBASE_RPR_KILL_SHADOWS ] { 64 } + Constant [ int IBASE_RPR_MEND_DB ] { 4 } + Constant [ int IBASE_RPR_VALIDATE_DB ] { 1 } + Constant [ int IBASE_RPR_FULL ] { 128 } + Constant [ int IBASE_RPR_SWEEP_DB ] { 2 } + Constant [ int IBASE_STS_DATA_PAGES ] { 1 } + Constant [ int IBASE_STS_DB_LOG ] { 2 } + Constant [ int IBASE_STS_HDR_PAGES ] { 4 } + Constant [ int IBASE_STS_IDX_PAGES ] { 8 } + Constant [ int IBASE_STS_SYS_RELATIONS ] { 16 } + Constant [ int IBASE_SVC_SERVER_VERSION ] { 55 } + Constant [ int IBASE_SVC_IMPLEMENTATION ] { 56 } + Constant [ int IBASE_SVC_GET_ENV ] { 59 } + Constant [ int IBASE_SVC_GET_ENV_LOCK ] { 60 } + Constant [ int IBASE_SVC_GET_ENV_MSG ] { 61 } + Constant [ int IBASE_SVC_USER_DBPATH ] { 58 } + Constant [ int IBASE_SVC_SVR_DB_INFO ] { 50 } + Constant [ int IBASE_SVC_GET_USERS ] { 68 } + } + + - Functions { + Function [ <internal:interbase> function ibase_connect ] { + + - Parameters [7] { + Parameter #0 [ <optional> $database ] + Parameter #1 [ <optional> $username ] + Parameter #2 [ <optional> $password ] + Parameter #3 [ <optional> $charset ] + Parameter #4 [ <optional> $buffers ] + Parameter #5 [ <optional> $dialect ] + Parameter #6 [ <optional> $role ] + } + } + Function [ <internal:interbase> function ibase_pconnect ] { + + - Parameters [7] { + Parameter #0 [ <optional> $database ] + Parameter #1 [ <optional> $username ] + Parameter #2 [ <optional> $password ] + Parameter #3 [ <optional> $charset ] + Parameter #4 [ <optional> $buffers ] + Parameter #5 [ <optional> $dialect ] + Parameter #6 [ <optional> $role ] + } + } + Function [ <internal:interbase> function ibase_close ] { + + - Parameters [1] { + Parameter #0 [ <optional> $link_identifier ] + } + } + Function [ <internal:interbase> function ibase_drop_db ] { + + - Parameters [1] { + Parameter #0 [ <optional> $link_identifier ] + } + } + Function [ <internal:interbase> function ibase_query ] { + + - Parameters [5] { + Parameter #0 [ <optional> $link_identifier ] + Parameter #1 [ <optional> $link_identifier ] + Parameter #2 [ <optional> $query ] + Parameter #3 [ <optional> $bind_arg ] + Parameter #4 [ <optional> $bind_arg ] + } + } + Function [ <internal:interbase> function ibase_fetch_row ] { + + - Parameters [2] { + Parameter #0 [ <required> $result ] + Parameter #1 [ <optional> $fetch_flags ] + } + } + Function [ <internal:interbase> function ibase_fetch_assoc ] { + + - Parameters [2] { + Parameter #0 [ <required> $result ] + Parameter #1 [ <optional> $fetch_flags ] + } + } + Function [ <internal:interbase> function ibase_fetch_object ] { + + - Parameters [2] { + Parameter #0 [ <required> $result ] + Parameter #1 [ <optional> $fetch_flags ] + } + } + Function [ <internal:interbase> function ibase_free_result ] { + + - Parameters [1] { + Parameter #0 [ <required> $result ] + } + } + Function [ <internal:interbase> function ibase_name_result ] { + + - Parameters [2] { + Parameter #0 [ <required> $result ] + Parameter #1 [ <required> $name ] + } + } + Function [ <internal:interbase> function ibase_prepare ] { + + - Parameters [2] { + Parameter #0 [ <optional> $link_identifier ] + Parameter #1 [ <optional> $query ] + } + } + Function [ <internal:interbase> function ibase_execute ] { + + - Parameters [3] { + Parameter #0 [ <required> $query ] + Parameter #1 [ <optional> $bind_arg ] + Parameter #2 [ <optional> $bind_arg ] + } + } + Function [ <internal:interbase> function ibase_free_query ] { + + - Parameters [1] { + Parameter #0 [ <required> $query ] + } + } + Function [ <internal:interbase> function ibase_gen_id ] { + + - Parameters [3] { + Parameter #0 [ <required> $generator ] + Parameter #1 [ <optional> $increment ] + Parameter #2 [ <optional> $link_identifier ] + } + } + Function [ <internal:interbase> function ibase_num_fields ] { + + - Parameters [1] { + Parameter #0 [ <required> $query_result ] + } + } + Function [ <internal:interbase> function ibase_num_params ] { + + - Parameters [1] { + Parameter #0 [ <required> $query ] + } + } + Function [ <internal:interbase> function ibase_affected_rows ] { + + - Parameters [1] { + Parameter #0 [ <optional> $link_identifier ] + } + } + Function [ <internal:interbase> function ibase_field_info ] { + + - Parameters [2] { + Parameter #0 [ <required> $query_result ] + Parameter #1 [ <required> $field_number ] + } + } + Function [ <internal:interbase> function ibase_param_info ] { + + - Parameters [2] { + Parameter #0 [ <required> $query ] + Parameter #1 [ <required> $field_number ] + } + } + Function [ <internal:interbase> function ibase_trans ] { + + - Parameters [4] { + Parameter #0 [ <optional> $trans_args ] + Parameter #1 [ <optional> $link_identifier ] + Parameter #2 [ <optional> $trans_args ] + Parameter #3 [ <optional> $link_identifier ] + } + } + Function [ <internal:interbase> function ibase_commit ] { + + - Parameters [1] { + Parameter #0 [ <required> $link_identifier ] + } + } + Function [ <internal:interbase> function ibase_rollback ] { + + - Parameters [1] { + Parameter #0 [ <required> $link_identifier ] + } + } + Function [ <internal:interbase> function ibase_commit_ret ] { + + - Parameters [1] { + Parameter #0 [ <required> $link_identifier ] + } + } + Function [ <internal:interbase> function ibase_rollback_ret ] { + + - Parameters [1] { + Parameter #0 [ <required> $link_identifier ] + } + } + Function [ <internal:interbase> function ibase_blob_info ] { + + - Parameters [2] { + Parameter #0 [ <optional> $link_identifier ] + Parameter #1 [ <optional> $blob_id ] + } + } + Function [ <internal:interbase> function ibase_blob_create ] { + + - Parameters [1] { + Parameter #0 [ <optional> $link_identifier ] + } + } + Function [ <internal:interbase> function ibase_blob_add ] { + + - Parameters [2] { + Parameter #0 [ <required> $blob_handle ] + Parameter #1 [ <required> $data ] + } + } + Function [ <internal:interbase> function ibase_blob_cancel ] { + + - Parameters [1] { + Parameter #0 [ <required> $blob_handle ] + } + } + Function [ <internal:interbase> function ibase_blob_close ] { + + - Parameters [1] { + Parameter #0 [ <required> $blob_handle ] + } + } + Function [ <internal:interbase> function ibase_blob_open ] { + + - Parameters [2] { + Parameter #0 [ <optional> $link_identifier ] + Parameter #1 [ <optional> $blob_id ] + } + } + Function [ <internal:interbase> function ibase_blob_get ] { + + - Parameters [2] { + Parameter #0 [ <required> $blob_handle ] + Parameter #1 [ <required> $len ] + } + } + Function [ <internal:interbase> function ibase_blob_echo ] { + + - Parameters [2] { + Parameter #0 [ <optional> $link_identifier ] + Parameter #1 [ <optional> $blob_id ] + } + } + Function [ <internal:interbase> function ibase_blob_import ] { + + - Parameters [2] { + Parameter #0 [ <optional> $link_identifier ] + Parameter #1 [ <optional> $file ] + } + } + Function [ <internal:interbase> function ibase_errmsg ] { + + - Parameters [0] { + } + } + Function [ <internal:interbase> function ibase_errcode ] { + + - Parameters [0] { + } + } + Function [ <internal:interbase> function ibase_add_user ] { + + - Parameters [6] { + Parameter #0 [ <required> $service_handle ] + Parameter #1 [ <required> $user_name ] + Parameter #2 [ <required> $password ] + Parameter #3 [ <optional> $first_name ] + Parameter #4 [ <optional> $middle_name ] + Parameter #5 [ <optional> $last_name ] + } + } + Function [ <internal:interbase> function ibase_modify_user ] { + + - Parameters [6] { + Parameter #0 [ <required> $service_handle ] + Parameter #1 [ <required> $user_name ] + Parameter #2 [ <required> $password ] + Parameter #3 [ <optional> $first_name ] + Parameter #4 [ <optional> $middle_name ] + Parameter #5 [ <optional> $last_name ] + } + } + Function [ <internal:interbase> function ibase_delete_user ] { + + - Parameters [6] { + Parameter #0 [ <required> $service_handle ] + Parameter #1 [ <required> $user_name ] + Parameter #2 [ <required> $password ] + Parameter #3 [ <optional> $first_name ] + Parameter #4 [ <optional> $middle_name ] + Parameter #5 [ <optional> $last_name ] + } + } + Function [ <internal:interbase> function ibase_service_attach ] { + + - Parameters [3] { + Parameter #0 [ <required> $host ] + Parameter #1 [ <required> $dba_username ] + Parameter #2 [ <required> $dba_password ] + } + } + Function [ <internal:interbase> function ibase_service_detach ] { + + - Parameters [1] { + Parameter #0 [ <required> $service_handle ] + } + } + Function [ <internal:interbase> function ibase_backup ] { + + - Parameters [5] { + Parameter #0 [ <required> $service_handle ] + Parameter #1 [ <required> $source_db ] + Parameter #2 [ <required> $dest_file ] + Parameter #3 [ <optional> $options ] + Parameter #4 [ <optional> $verbose ] + } + } + Function [ <internal:interbase> function ibase_restore ] { + + - Parameters [5] { + Parameter #0 [ <required> $service_handle ] + Parameter #1 [ <required> $source_file ] + Parameter #2 [ <required> $dest_db ] + Parameter #3 [ <optional> $options ] + Parameter #4 [ <optional> $verbose ] + } + } + Function [ <internal:interbase> function ibase_maintain_db ] { + + - Parameters [4] { + Parameter #0 [ <required> $service_handle ] + Parameter #1 [ <required> $db ] + Parameter #2 [ <required> $action ] + Parameter #3 [ <optional> $argument ] + } + } + Function [ <internal:interbase> function ibase_db_info ] { + + - Parameters [4] { + Parameter #0 [ <required> $service_handle ] + Parameter #1 [ <required> $db ] + Parameter #2 [ <required> $action ] + Parameter #3 [ <optional> $argument ] + } + } + Function [ <internal:interbase> function ibase_server_info ] { + + - Parameters [2] { + Parameter #0 [ <required> $service_handle ] + Parameter #1 [ <required> $action ] + } + } + Function [ <internal:interbase> function ibase_wait_event ] { + + - Parameters [3] { + Parameter #0 [ <required> $link_identifier ] + Parameter #1 [ <optional> $event ] + Parameter #2 [ <optional> $event2 ] + } + } + Function [ <internal:interbase> function ibase_set_event_handler ] { + + - Parameters [4] { + Parameter #0 [ <required> $link_identifier ] + Parameter #1 [ <required> $handler ] + Parameter #2 [ <optional> $event ] + Parameter #3 [ <optional> $event2 ] + } + } + Function [ <internal:interbase> function ibase_free_event_handler ] { + + - Parameters [1] { + Parameter #0 [ <required> $event ] + } + } + Function [ <internal:interbase> function fbird_connect ] { + + - Parameters [7] { + Parameter #0 [ <optional> $database ] + Parameter #1 [ <optional> $username ] + Parameter #2 [ <optional> $password ] + Parameter #3 [ <optional> $charset ] + Parameter #4 [ <optional> $buffers ] + Parameter #5 [ <optional> $dialect ] + Parameter #6 [ <optional> $role ] + } + } + Function [ <internal:interbase> function fbird_pconnect ] { + + - Parameters [7] { + Parameter #0 [ <optional> $database ] + Parameter #1 [ <optional> $username ] + Parameter #2 [ <optional> $password ] + Parameter #3 [ <optional> $charset ] + Parameter #4 [ <optional> $buffers ] + Parameter #5 [ <optional> $dialect ] + Parameter #6 [ <optional> $role ] + } + } + Function [ <internal:interbase> function fbird_close ] { + + - Parameters [1] { + Parameter #0 [ <optional> $link_identifier ] + } + } + Function [ <internal:interbase> function fbird_drop_db ] { + + - Parameters [1] { + Parameter #0 [ <optional> $link_identifier ] + } + } + Function [ <internal:interbase> function fbird_query ] { + + - Parameters [5] { + Parameter #0 [ <optional> $link_identifier ] + Parameter #1 [ <optional> $link_identifier ] + Parameter #2 [ <optional> $query ] + Parameter #3 [ <optional> $bind_arg ] + Parameter #4 [ <optional> $bind_arg ] + } + } + Function [ <internal:interbase> function fbird_fetch_row ] { + + - Parameters [2] { + Parameter #0 [ <required> $result ] + Parameter #1 [ <optional> $fetch_flags ] + } + } + Function [ <internal:interbase> function fbird_fetch_assoc ] { + + - Parameters [2] { + Parameter #0 [ <required> $result ] + Parameter #1 [ <optional> $fetch_flags ] + } + } + Function [ <internal:interbase> function fbird_fetch_object ] { + + - Parameters [2] { + Parameter #0 [ <required> $result ] + Parameter #1 [ <optional> $fetch_flags ] + } + } + Function [ <internal:interbase> function fbird_free_result ] { + + - Parameters [1] { + Parameter #0 [ <required> $result ] + } + } + Function [ <internal:interbase> function fbird_name_result ] { + + - Parameters [2] { + Parameter #0 [ <required> $result ] + Parameter #1 [ <required> $name ] + } + } + Function [ <internal:interbase> function fbird_prepare ] { + + - Parameters [2] { + Parameter #0 [ <optional> $link_identifier ] + Parameter #1 [ <optional> $query ] + } + } + Function [ <internal:interbase> function fbird_execute ] { + + - Parameters [3] { + Parameter #0 [ <required> $query ] + Parameter #1 [ <optional> $bind_arg ] + Parameter #2 [ <optional> $bind_arg ] + } + } + Function [ <internal:interbase> function fbird_free_query ] { + + - Parameters [1] { + Parameter #0 [ <required> $query ] + } + } + Function [ <internal:interbase> function fbird_gen_id ] { + + - Parameters [3] { + Parameter #0 [ <required> $generator ] + Parameter #1 [ <optional> $increment ] + Parameter #2 [ <optional> $link_identifier ] + } + } + Function [ <internal:interbase> function fbird_num_fields ] { + + - Parameters [1] { + Parameter #0 [ <required> $query_result ] + } + } + Function [ <internal:interbase> function fbird_num_params ] { + + - Parameters [1] { + Parameter #0 [ <required> $query ] + } + } + Function [ <internal:interbase> function fbird_affected_rows ] { + + - Parameters [1] { + Parameter #0 [ <optional> $link_identifier ] + } + } + Function [ <internal:interbase> function fbird_field_info ] { + + - Parameters [2] { + Parameter #0 [ <required> $query_result ] + Parameter #1 [ <required> $field_number ] + } + } + Function [ <internal:interbase> function fbird_param_info ] { + + - Parameters [2] { + Parameter #0 [ <required> $query ] + Parameter #1 [ <required> $field_number ] + } + } + Function [ <internal:interbase> function fbird_trans ] { + + - Parameters [4] { + Parameter #0 [ <optional> $trans_args ] + Parameter #1 [ <optional> $link_identifier ] + Parameter #2 [ <optional> $trans_args ] + Parameter #3 [ <optional> $link_identifier ] + } + } + Function [ <internal:interbase> function fbird_commit ] { + + - Parameters [1] { + Parameter #0 [ <required> $link_identifier ] + } + } + Function [ <internal:interbase> function fbird_rollback ] { + + - Parameters [1] { + Parameter #0 [ <required> $link_identifier ] + } + } + Function [ <internal:interbase> function fbird_commit_ret ] { + + - Parameters [1] { + Parameter #0 [ <required> $link_identifier ] + } + } + Function [ <internal:interbase> function fbird_rollback_ret ] { + + - Parameters [1] { + Parameter #0 [ <required> $link_identifier ] + } + } + Function [ <internal:interbase> function fbird_blob_info ] { + + - Parameters [2] { + Parameter #0 [ <optional> $link_identifier ] + Parameter #1 [ <optional> $blob_id ] + } + } + Function [ <internal:interbase> function fbird_blob_create ] { + + - Parameters [1] { + Parameter #0 [ <optional> $link_identifier ] + } + } + Function [ <internal:interbase> function fbird_blob_add ] { + + - Parameters [2] { + Parameter #0 [ <required> $blob_handle ] + Parameter #1 [ <required> $data ] + } + } + Function [ <internal:interbase> function fbird_blob_cancel ] { + + - Parameters [1] { + Parameter #0 [ <required> $blob_handle ] + } + } + Function [ <internal:interbase> function fbird_blob_close ] { + + - Parameters [1] { + Parameter #0 [ <required> $blob_handle ] + } + } + Function [ <internal:interbase> function fbird_blob_open ] { + + - Parameters [2] { + Parameter #0 [ <optional> $link_identifier ] + Parameter #1 [ <optional> $blob_id ] + } + } + Function [ <internal:interbase> function fbird_blob_get ] { + + - Parameters [2] { + Parameter #0 [ <required> $blob_handle ] + Parameter #1 [ <required> $len ] + } + } + Function [ <internal:interbase> function fbird_blob_echo ] { + + - Parameters [2] { + Parameter #0 [ <optional> $link_identifier ] + Parameter #1 [ <optional> $blob_id ] + } + } + Function [ <internal:interbase> function fbird_blob_import ] { + + - Parameters [2] { + Parameter #0 [ <optional> $link_identifier ] + Parameter #1 [ <optional> $file ] + } + } + Function [ <internal:interbase> function fbird_errmsg ] { + + - Parameters [0] { + } + } + Function [ <internal:interbase> function fbird_errcode ] { + + - Parameters [0] { + } + } + Function [ <internal:interbase> function fbird_add_user ] { + + - Parameters [6] { + Parameter #0 [ <required> $service_handle ] + Parameter #1 [ <required> $user_name ] + Parameter #2 [ <required> $password ] + Parameter #3 [ <optional> $first_name ] + Parameter #4 [ <optional> $middle_name ] + Parameter #5 [ <optional> $last_name ] + } + } + Function [ <internal:interbase> function fbird_modify_user ] { + + - Parameters [6] { + Parameter #0 [ <required> $service_handle ] + Parameter #1 [ <required> $user_name ] + Parameter #2 [ <required> $password ] + Parameter #3 [ <optional> $first_name ] + Parameter #4 [ <optional> $middle_name ] + Parameter #5 [ <optional> $last_name ] + } + } + Function [ <internal:interbase> function fbird_delete_user ] { + + - Parameters [6] { + Parameter #0 [ <required> $service_handle ] + Parameter #1 [ <required> $user_name ] + Parameter #2 [ <required> $password ] + Parameter #3 [ <optional> $first_name ] + Parameter #4 [ <optional> $middle_name ] + Parameter #5 [ <optional> $last_name ] + } + } + Function [ <internal:interbase> function fbird_service_attach ] { + + - Parameters [3] { + Parameter #0 [ <required> $host ] + Parameter #1 [ <required> $dba_username ] + Parameter #2 [ <required> $dba_password ] + } + } + Function [ <internal:interbase> function fbird_service_detach ] { + + - Parameters [1] { + Parameter #0 [ <required> $service_handle ] + } + } + Function [ <internal:interbase> function fbird_backup ] { + + - Parameters [5] { + Parameter #0 [ <required> $service_handle ] + Parameter #1 [ <required> $source_db ] + Parameter #2 [ <required> $dest_file ] + Parameter #3 [ <optional> $options ] + Parameter #4 [ <optional> $verbose ] + } + } + Function [ <internal:interbase> function fbird_restore ] { + + - Parameters [5] { + Parameter #0 [ <required> $service_handle ] + Parameter #1 [ <required> $source_file ] + Parameter #2 [ <required> $dest_db ] + Parameter #3 [ <optional> $options ] + Parameter #4 [ <optional> $verbose ] + } + } + Function [ <internal:interbase> function fbird_maintain_db ] { + + - Parameters [4] { + Parameter #0 [ <required> $service_handle ] + Parameter #1 [ <required> $db ] + Parameter #2 [ <required> $action ] + Parameter #3 [ <optional> $argument ] + } + } + Function [ <internal:interbase> function fbird_db_info ] { + + - Parameters [4] { + Parameter #0 [ <required> $service_handle ] + Parameter #1 [ <required> $db ] + Parameter #2 [ <required> $action ] + Parameter #3 [ <optional> $argument ] + } + } + Function [ <internal:interbase> function fbird_server_info ] { + + - Parameters [2] { + Parameter #0 [ <required> $service_handle ] + Parameter #1 [ <required> $action ] + } + } + Function [ <internal:interbase> function fbird_wait_event ] { + + - Parameters [3] { + Parameter #0 [ <required> $link_identifier ] + Parameter #1 [ <optional> $event ] + Parameter #2 [ <optional> $event2 ] + } + } + Function [ <internal:interbase> function fbird_set_event_handler ] { + + - Parameters [4] { + Parameter #0 [ <required> $link_identifier ] + Parameter #1 [ <required> $handler ] + Parameter #2 [ <optional> $event ] + Parameter #3 [ <optional> $event2 ] + } + } + Function [ <internal:interbase> function fbird_free_event_handler ] { + + - Parameters [1] { + Parameter #0 [ <required> $event ] + } + } + } +} + diff --git a/php-pecl-interbase.spec b/php-pecl-interbase.spec new file mode 100644 index 0000000..1908ea6 --- /dev/null +++ b/php-pecl-interbase.spec @@ -0,0 +1,236 @@ +# remirepo spec file for php-pecl-interbase +# +# Copyright (c) 2019 Remi Collet +# License: CC-BY-SA +# http://creativecommons.org/licenses/by-sa/4.0/ +# +# Please, preserve the changelog entries +# + +# we don't want -z defs linker flag +%undefine _strict_symbol_defs_build + +%if 0%{?scl:1} +%global sub_prefix %{scl_prefix} +%scl_package php-pecl-interbase +%else +%global _root_bindir %{_bindir} +%global _root_libexecdir %{_libexecdir} +%endif + +# https://github.com/php/pecl-database-interbase/commits/master +%global gh_commit 05049db61daf4bac6ca7d02591a86284644cde90 +%global gh_short %(c=%{gh_commit}; echo ${c:0:7}) +%global gh_owner php +%global gh_project pecl-database-interbase +%global gh_date 20190523 +%global with_zts 0%{?_with_zts:%{?__ztsphp:1}} +%global pecl_name interbase +%global with_tests 0%{?_with_tests:1} +%global upver 1.0.0 +%global lower DEV +%global ini_name 20-%{pecl_name}.ini + +Summary: InterBase/FireBird extension +Name: %{?sub_prefix}php-pecl-%{pecl_name} +Version: %{upver}%{?lower:~%{lower}}%{?gh_date:.%{gh_date}} +Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} + +License: PHP +URL: http://pecl.php.net/package/%{pecl_name} +Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{pecl_name}-%{upver}-%{gh_short}.tar.gz + +BuildRequires: %{?dtsprefix}gcc +BuildRequires: %{?scl_prefix}php-devel > 7 +BuildRequires: %{?scl_prefix}php-pear +BuildRequires: firebird-devel + +Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} +Requires: %{?scl_prefix}php(api) = %{php_core_api} +# ensure php-interbase pull both extension as in previous version +Requires: %{?scl_prefix}php-pdo-firebird%{?_isa} +%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}} + +# Set epoch so provides is > 0:7.3 +Provides: %{?scl_prefix}php-%{pecl_name} = 1:%{version} +Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = 1:%{version} +Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version} +Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version} +%if "%{?scl_prefix}" != "%{?sub_prefix}" +Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{release} +Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release} +%endif + +%if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} +# Other third party repo stuff +%if "%{php_version}" > "7.4" +Obsoletes: php74-pecl-%{pecl_name} <= %{version} +Obsoletes: php74w-pecl-%{pecl_name} <= %{version} +%endif +%endif + +%if 0%{?fedora} < 20 && 0%{?rhel} < 7 +# Filter private shared object +%{?filter_provides_in: %filter_provides_in %{_libdir}/.*\.so$} +%{?filter_setup} +%endif + + +%description +The php-interbase package contains a dynamic shared object that will add +database support through Interbase/Firebird to PHP. + +InterBase is the name of the closed-source variant of this RDBMS that was +developed by Borland/Inprise. + +Firebird is a commercially independent project of C and C++ programmers, +technical advisors and supporters developing and enhancing a multi-platform +relational database management system based on the source code released by +Inprise Corp (now known as Borland Software Corp) under the InterBase Public +License. + +This extension which was previously part of the PHP distribution. + +Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')%{?scl: as Software Collection (%{scl} by %{?scl_vendor}%{!?scl_vendor:rh})}. + + +%prep +%setup -qc +mv %{gh_project}-%{gh_commit} NTS + +cd NTS +# Check version as upstream often forget to update this +extver=$(sed -n '/#define PHP_INTERBASE_VERSION/{s/.* "//;s/".*$//;p}' php_interbase.h) +if test "x${extver}" != "x%{upver}%{?rcver}%{?gh_date:-dev}"; then + : Error: Upstream INTERBASE version is ${extver}, expecting %{upver}%{?rcver}%{?gh_date:-dev}. + exit 1 +fi +cd .. + +# Create configuration file +cat << 'EOF' | tee %{ini_name} +; Enable "%{summary}" module +extension=%{pecl_name} + +; Allow or prevent persistent links. +;ibase.allow_persistent = 1 + +; Maximum number of persistent links. -1 means no limit. +;ibase.max_persistent = -1 + +; Maximum number of links (persistent + non-persistent). -1 means no limit. +;ibase.max_links = -1 + +; Default database name for ibase_connect(). +;ibase.default_db = + +; Default username for ibase_connect(). +;ibase.default_user = + +; Default password for ibase_connect(). +;ibase.default_password = + +; Default charset for ibase_connect(). +;ibase.default_charset = + +; Default timestamp format. +;ibase.timestampformat = "%Y-%m-%d %H:%M:%S" + +; Default date format. +;ibase.dateformat = "%Y-%m-%d" + +; Default time format. +;ibase.timeformat = "%H:%M:%S" +EOF + + +%if %{with_zts} +# duplicate for ZTS build +cp -pr NTS ZTS +%endif + + +%build +%{?dtsenable} + +export PHP_RPATH=no + +peclconf() { +%configure \ + --with-interbase \ + --with-php-config=$1 +} + +cd NTS +%{_bindir}/phpize +peclconf %{_bindir}/php-config +make %{?_smp_mflags} + +%if %{with_zts} +cd ../ZTS +%{_bindir}/zts-phpize +peclconf %{_bindir}/zts-php-config +make %{?_smp_mflags} +%endif + + +%install +%{?dtsenable} + +# Install the NTS stuff +make -C NTS install INSTALL_ROOT=%{buildroot} +install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name} + +# Install the ZTS stuff +%if %{with_zts} +make -C ZTS install INSTALL_ROOT=%{buildroot} +install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} +%endif + + +%check +cd NTS + +: Minimal load test for NTS extension +%{_bindir}/php --no-php-ini \ + --define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \ + --modules | grep '^%{pecl_name}$' + +%if %{with_zts} +cd ../ZTS + +: Minimal load test for ZTS extension +%{__ztsphp} --no-php-ini \ + --define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \ + --modules | grep '^%{pecl_name}$' + +%endif + +%if %{with_tests} +cd ../NTS + +: Run upstream test suite +TEST_PHP_EXECUTABLE=%{__php} \ +TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" \ +NO_INTERACTION=1 \ +REPORT_EXIT_STATUS=1 \ +%{__php} -n run-tests.php -q --show-diff +%endif + + +%files +%{!?_licensedir:%global license %%doc} +%license NTS/LICENSE + +%config(noreplace) %{php_inidir}/%{ini_name} +%{php_extdir}/%{pecl_name}.so + +%if %{with_zts} +%{php_ztsextdir}/%{pecl_name}.so +%config(noreplace) %{php_ztsinidir}/%{ini_name} +%endif + + +%changelog +* Thu May 23 2019 Remi Collet <remi@remirepo.net> - 1.0.0~DEV.20190523-1 +- initial package, version 1.0.0-dev |