root/ext/pdo_sqlite/pdo_sqlite.c

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. ZEND_GET_MODULE
  2. PHP_MSHUTDOWN_FUNCTION
  3. PHP_MINFO_FUNCTION

   1 /*
   2   +----------------------------------------------------------------------+
   3   | PHP Version 7                                                        |
   4   +----------------------------------------------------------------------+
   5   | Copyright (c) 1997-2016 The PHP Group                                |
   6   +----------------------------------------------------------------------+
   7   | This source file is subject to version 3.01 of the PHP license,      |
   8   | that is bundled with this package in the file LICENSE, and is        |
   9   | available through the world-wide-web at the following url:           |
  10   | http://www.php.net/license/3_01.txt                                  |
  11   | If you did not receive a copy of the PHP license and are unable to   |
  12   | obtain it through the world-wide-web, please send a note to          |
  13   | license@php.net so we can mail you a copy immediately.               |
  14   +----------------------------------------------------------------------+
  15   | Author: Wez Furlong <wez@php.net>                                    |
  16   +----------------------------------------------------------------------+
  17 */
  18 
  19 /* $Id$ */
  20 
  21 #ifdef HAVE_CONFIG_H
  22 #include "config.h"
  23 #endif
  24 
  25 #include "php.h"
  26 #include "php_ini.h"
  27 #include "ext/standard/info.h"
  28 #include "pdo/php_pdo.h"
  29 #include "pdo/php_pdo_driver.h"
  30 #include "php_pdo_sqlite.h"
  31 #include "php_pdo_sqlite_int.h"
  32 #include "zend_exceptions.h"
  33 
  34 /* {{{ pdo_sqlite_functions[] */
  35 const zend_function_entry pdo_sqlite_functions[] = {
  36         PHP_FE_END
  37 };
  38 /* }}} */
  39 
  40 /* {{{ pdo_sqlite_deps
  41  */
  42 #if ZEND_MODULE_API_NO >= 20050922
  43 static const zend_module_dep pdo_sqlite_deps[] = {
  44         ZEND_MOD_REQUIRED("pdo")
  45         ZEND_MOD_END
  46 };
  47 #endif
  48 /* }}} */
  49 
  50 /* {{{ pdo_sqlite_module_entry
  51  */
  52 zend_module_entry pdo_sqlite_module_entry = {
  53         STANDARD_MODULE_HEADER_EX, NULL,
  54         pdo_sqlite_deps,
  55         "pdo_sqlite",
  56         pdo_sqlite_functions,
  57         PHP_MINIT(pdo_sqlite),
  58         PHP_MSHUTDOWN(pdo_sqlite),
  59         NULL,
  60         NULL,
  61         PHP_MINFO(pdo_sqlite),
  62         PHP_PDO_SQLITE_VERSION,
  63         STANDARD_MODULE_PROPERTIES
  64 };
  65 /* }}} */
  66 
  67 #if defined(COMPILE_DL_PDO_SQLITE) || defined(COMPILE_DL_PDO_SQLITE_EXTERNAL)
  68 ZEND_GET_MODULE(pdo_sqlite)
  69 #endif
  70 
  71 /* {{{ PHP_MINIT_FUNCTION */
  72 PHP_MINIT_FUNCTION(pdo_sqlite)
  73 {
  74         return php_pdo_register_driver(&pdo_sqlite_driver);
  75 }
  76 /* }}} */
  77 
  78 /* {{{ PHP_MSHUTDOWN_FUNCTION */
  79 PHP_MSHUTDOWN_FUNCTION(pdo_sqlite)
  80 {
  81         php_pdo_unregister_driver(&pdo_sqlite_driver);
  82         return SUCCESS;
  83 }
  84 /* }}} */
  85 
  86 /* {{{ PHP_MINFO_FUNCTION
  87  */
  88 PHP_MINFO_FUNCTION(pdo_sqlite)
  89 {
  90         php_info_print_table_start();
  91         php_info_print_table_header(2, "PDO Driver for SQLite 3.x", "enabled");
  92         php_info_print_table_row(2, "SQLite Library", sqlite3_libversion());
  93         php_info_print_table_end();
  94 }
  95 /* }}} */
  96 
  97 /*
  98  * Local variables:
  99  * tab-width: 4
 100  * c-basic-offset: 4
 101  * End:
 102  * vim600: noet sw=4 ts=4 fdm=marker
 103  * vim<600: noet sw=4 ts=4
 104  */

/* [<][>][^][v][top][bottom][index][help] */