Back to index

php5  5.3.10
pdo_firebird.c
Go to the documentation of this file.
00001 /*
00002   +----------------------------------------------------------------------+
00003   | PHP Version 5                                                        |
00004   +----------------------------------------------------------------------+
00005   | Copyright (c) 1997-2012 The PHP Group                                |
00006   +----------------------------------------------------------------------+
00007   | This source file is subject to version 3.01 of the PHP license,      |
00008   | that is bundled with this package in the file LICENSE, and is        |
00009   | available through the world-wide-web at the following url:           |
00010   | http://www.php.net/license/3_01.txt                                  |
00011   | If you did not receive a copy of the PHP license and are unable to   |
00012   | obtain it through the world-wide-web, please send a note to          |
00013   | license@php.net so we can mail you a copy immediately.               |
00014   +----------------------------------------------------------------------+
00015   | Author: Ard Biesheuvel <abies@php.net>                               |
00016   +----------------------------------------------------------------------+
00017 */
00018 
00019 /* $Id: pdo_firebird.c 321634 2012-01-01 13:15:04Z felipe $ */
00020 
00021 #ifdef HAVE_CONFIG_H
00022 #include "config.h"
00023 #endif
00024 
00025 #include "php.h"
00026 #include "php_ini.h"
00027 #include "ext/standard/info.h"
00028 #include "pdo/php_pdo.h"
00029 #include "pdo/php_pdo_driver.h"
00030 #include "php_pdo_firebird.h"
00031 #include "php_pdo_firebird_int.h"
00032 
00033 const zend_function_entry pdo_firebird_functions[] = { /* {{{ */
00034        PHP_FE_END
00035 };
00036 /* }}} */
00037 
00038 /* {{{ pdo_firebird_deps
00039  */
00040 #if ZEND_MODULE_API_NO >= 20050922
00041 static const zend_module_dep pdo_firebird_deps[] = {
00042        ZEND_MOD_REQUIRED("pdo")
00043        ZEND_MOD_END
00044 };
00045 #endif
00046 /* }}} */
00047 
00048 zend_module_entry pdo_firebird_module_entry = { /* {{{ */
00049 #if ZEND_MODULE_API_NO >= 20050922
00050        STANDARD_MODULE_HEADER_EX, NULL,
00051        pdo_firebird_deps,
00052 #else
00053        STANDARD_MODULE_HEADER,
00054 #endif
00055        "PDO_Firebird",
00056        pdo_firebird_functions,
00057        PHP_MINIT(pdo_firebird),
00058        PHP_MSHUTDOWN(pdo_firebird),
00059        NULL,
00060        NULL,
00061        PHP_MINFO(pdo_firebird),
00062        "0.3",
00063        STANDARD_MODULE_PROPERTIES
00064 };
00065 /* }}} */
00066 
00067 #ifdef COMPILE_DL_PDO_FIREBIRD
00068 ZEND_GET_MODULE(pdo_firebird)
00069 #endif
00070 
00071 PHP_MINIT_FUNCTION(pdo_firebird) /* {{{ */
00072 {
00073        REGISTER_PDO_CLASS_CONST_LONG("FB_ATTR_DATE_FORMAT", (long) PDO_FB_ATTR_DATE_FORMAT);
00074        REGISTER_PDO_CLASS_CONST_LONG("FB_ATTR_TIME_FORMAT", (long) PDO_FB_ATTR_TIME_FORMAT);
00075        REGISTER_PDO_CLASS_CONST_LONG("FB_ATTR_TIMESTAMP_FORMAT", (long) PDO_FB_ATTR_TIMESTAMP_FORMAT);
00076 
00077        php_pdo_register_driver(&pdo_firebird_driver);
00078 
00079        return SUCCESS;
00080 }
00081 /* }}} */
00082 
00083 PHP_MSHUTDOWN_FUNCTION(pdo_firebird) /* {{{ */
00084 {
00085        php_pdo_unregister_driver(&pdo_firebird_driver);
00086 
00087        return SUCCESS;
00088 }
00089 /* }}} */
00090 
00091 PHP_MINFO_FUNCTION(pdo_firebird) /* {{{ */
00092 {
00093        php_info_print_table_start();
00094        php_info_print_table_header(2, "PDO Driver for Firebird/InterBase", "enabled");
00095        php_info_print_table_end();
00096 }
00097 /* }}} */
00098 
00099 /*
00100  * Local variables:
00101  * tab-width: 4
00102  * c-basic-offset: 4
00103  * End:
00104  * vim600: noet sw=4 ts=4 fdm=marker
00105  * vim<600: noet sw=4 ts=4
00106  */