php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
pdo_firebird.c
Go to the documentation of this file.
1/*
2 +----------------------------------------------------------------------+
3 | Copyright (c) The PHP Group |
4 +----------------------------------------------------------------------+
5 | This source file is subject to version 3.01 of the PHP license, |
6 | that is bundled with this package in the file LICENSE, and is |
7 | available through the world-wide-web at the following url: |
8 | https://www.php.net/license/3_01.txt |
9 | If you did not receive a copy of the PHP license and are unable to |
10 | obtain it through the world-wide-web, please send a note to |
11 | license@php.net so we can mail you a copy immediately. |
12 +----------------------------------------------------------------------+
13 | Author: Ard Biesheuvel <abies@php.net> |
14 +----------------------------------------------------------------------+
15*/
16
17#ifdef HAVE_CONFIG_H
18#include <config.h>
19#endif
20
21#include "php.h"
22#include "php_ini.h"
23#include "ext/standard/info.h"
24#include "ext/pdo/php_pdo.h"
26#include "php_pdo_firebird.h"
29
30static zend_class_entry *PdoFirebird_ce;
31
32/* {{{ pdo_firebird_deps */
33static const zend_module_dep pdo_firebird_deps[] = {
36};
37/* }}} */
38
41 pdo_firebird_deps,
42 "PDO_Firebird",
43 NULL,
44 PHP_MINIT(pdo_firebird),
45 PHP_MSHUTDOWN(pdo_firebird),
46 NULL,
47 NULL,
48 PHP_MINFO(pdo_firebird),
51};
52/* }}} */
53
54#ifdef COMPILE_DL_PDO_FIREBIRD
55ZEND_GET_MODULE(pdo_firebird)
56#endif
57
58PHP_MINIT_FUNCTION(pdo_firebird) /* {{{ */
59{
63
67
68 PdoFirebird_ce = register_class_Pdo_Firebird(pdo_dbh_ce);
69 PdoFirebird_ce->create_object = pdo_dbh_new;
70
71#ifdef ZEND_SIGNALS
72 /* firebird replaces some signals at runtime, suppress warnings. */
73 SIGG(check) = 0;
74#endif
75
77}
78/* }}} */
79
80PHP_MSHUTDOWN_FUNCTION(pdo_firebird) /* {{{ */
81{
83
84 return SUCCESS;
85}
86/* }}} */
87
88PHP_MINFO_FUNCTION(pdo_firebird) /* {{{ */
89{
90 char version[64];
91 char api_version[8];
93
94 snprintf(api_version, 7, "%d", FB_API_VER);
95
97 php_info_print_table_row(2, "PDO Driver for Firebird", "enabled");
98 php_info_print_table_row(2, "Client Library Version", version);
99 php_info_print_table_row(2, "Firebird API version", api_version);
101}
102/* }}} */
103
104PHP_METHOD(Pdo_Firebird, getApiVersion)
105{
108 }
109
110 RETURN_LONG(FB_API_VER);
111}
const pdo_driver_t pdo_firebird_driver
#define NULL
Definition gdcache.h:45
#define SUCCESS
Definition hash_sha3.c:261
PDO_API void php_pdo_unregister_driver(const pdo_driver_t *driver)
Definition pdo.c:129
PDO_API zend_result php_pdo_register_driver(const pdo_driver_t *driver)
Definition pdo.c:113
PDO_API zend_result php_pdo_register_driver_specific_ce(const pdo_driver_t *driver, zend_class_entry *ce)
Definition pdo.c:140
zend_class_entry * pdo_dbh_ce
Definition pdo.c:34
zend_object * pdo_dbh_new(zend_class_entry *ce)
Definition pdo_dbh.c:1533
php_info_print_table_start()
Definition info.c:1064
char api_version[8]
php_info_print_table_row(2, "PDO Driver for Firebird", "enabled")
isc_get_client_version(version)
php_info_print_table_end()
Definition info.c:1074
zend_module_entry pdo_firebird_module_entry
#define PHP_MSHUTDOWN_FUNCTION
Definition php.h:401
#define PHP_MINFO
Definition php.h:396
#define PHP_MINIT_FUNCTION
Definition php.h:400
#define PHP_MSHUTDOWN
Definition php.h:393
#define PHP_MINFO_FUNCTION
Definition php.h:404
#define PHP_MINIT
Definition php.h:392
#define PHP_METHOD
Definition php.h:365
#define REGISTER_PDO_CLASS_CONST_LONG(const_name, value)
Definition php_pdo.h:53
#define PHP_PDO_FIREBIRD_VERSION
@ PDO_FB_ATTR_TIME_FORMAT
@ PDO_FB_ATTR_TIMESTAMP_FORMAT
@ PDO_FB_ATTR_DATE_FORMAT
#define ZEND_GET_MODULE(name)
Definition zend_API.h:241
#define zend_parse_parameters_none()
Definition zend_API.h:353
#define RETURN_LONG(l)
Definition zend_API.h:1037
#define RETURN_THROWS()
Definition zend_API.h:1060
#define snprintf
int32_t zend_long
Definition zend_long.h:42
#define ZEND_MOD_END
struct _zend_module_dep zend_module_dep
struct _zend_module_entry zend_module_entry
#define STANDARD_MODULE_PROPERTIES
#define ZEND_MOD_REQUIRED(name)
#define STANDARD_MODULE_HEADER_EX
struct _zend_class_entry zend_class_entry
@ FAILURE
Definition zend_types.h:61