Back to index

php5  5.3.10
pdo_sqlite.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: Wez Furlong <wez@php.net>                                    |
00016   +----------------------------------------------------------------------+
00017 */
00018 
00019 /* $Id: pdo_sqlite.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_sqlite.h"
00031 #include "php_pdo_sqlite_int.h"
00032 #include "zend_exceptions.h"
00033 
00034 #define PHP_PDO_SQLITE_MODULE_VERSION     "1.0.1"
00035 
00036 /* {{{ pdo_sqlite_functions[] */
00037 const zend_function_entry pdo_sqlite_functions[] = {
00038        PHP_FE_END
00039 };
00040 /* }}} */
00041 
00042 /* {{{ pdo_sqlite_deps
00043  */
00044 #if ZEND_MODULE_API_NO >= 20050922
00045 static const zend_module_dep pdo_sqlite_deps[] = {
00046        ZEND_MOD_REQUIRED("pdo")
00047        ZEND_MOD_END
00048 };
00049 #endif
00050 /* }}} */
00051 
00052 /* {{{ pdo_sqlite_module_entry
00053  */
00054 zend_module_entry pdo_sqlite_module_entry = {
00055 #if ZEND_MODULE_API_NO >= 20050922
00056        STANDARD_MODULE_HEADER_EX, NULL,
00057        pdo_sqlite_deps,
00058 #else
00059        STANDARD_MODULE_HEADER,
00060 #endif
00061        "pdo_sqlite",
00062        pdo_sqlite_functions,
00063        PHP_MINIT(pdo_sqlite),
00064        PHP_MSHUTDOWN(pdo_sqlite),
00065        NULL,
00066        NULL,
00067        PHP_MINFO(pdo_sqlite),
00068        PHP_PDO_SQLITE_MODULE_VERSION,
00069        STANDARD_MODULE_PROPERTIES
00070 };
00071 /* }}} */
00072 
00073 #if defined(COMPILE_DL_PDO_SQLITE) || defined(COMPILE_DL_PDO_SQLITE_EXTERNAL)
00074 ZEND_GET_MODULE(pdo_sqlite)
00075 #endif
00076 
00077 /* {{{ PHP_MINIT_FUNCTION */
00078 PHP_MINIT_FUNCTION(pdo_sqlite)
00079 {
00080        return php_pdo_register_driver(&pdo_sqlite_driver);
00081 }
00082 /* }}} */
00083 
00084 /* {{{ PHP_MSHUTDOWN_FUNCTION */
00085 PHP_MSHUTDOWN_FUNCTION(pdo_sqlite)
00086 {
00087        php_pdo_unregister_driver(&pdo_sqlite_driver);
00088        return SUCCESS;
00089 }
00090 /* }}} */
00091 
00092 /* {{{ PHP_MINFO_FUNCTION
00093  */
00094 PHP_MINFO_FUNCTION(pdo_sqlite)
00095 {
00096        php_info_print_table_start();
00097        php_info_print_table_header(2, "PDO Driver for SQLite 3.x", "enabled");
00098        php_info_print_table_row(2, "SQLite Library", sqlite3_libversion());
00099        php_info_print_table_end();
00100 }
00101 /* }}} */
00102 
00103 /*
00104  * Local variables:
00105  * tab-width: 4
00106  * c-basic-offset: 4
00107  * End:
00108  * vim600: noet sw=4 ts=4 fdm=marker
00109  * vim<600: noet sw=4 ts=4
00110  */