pdo_firebird.c 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. /*
  2. +----------------------------------------------------------------------+
  3. | PHP Version 5 |
  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: Ard Biesheuvel <abies@php.net> |
  16. +----------------------------------------------------------------------+
  17. */
  18. #ifdef HAVE_CONFIG_H
  19. #include "config.h"
  20. #endif
  21. #include "php.h"
  22. #include "php_ini.h"
  23. #include "ext/standard/info.h"
  24. #include "pdo/php_pdo.h"
  25. #include "pdo/php_pdo_driver.h"
  26. #include "php_pdo_firebird.h"
  27. #include "php_pdo_firebird_int.h"
  28. const zend_function_entry pdo_firebird_functions[] = { /* {{{ */
  29. PHP_FE_END
  30. };
  31. /* }}} */
  32. /* {{{ pdo_firebird_deps
  33. */
  34. static const zend_module_dep pdo_firebird_deps[] = {
  35. ZEND_MOD_REQUIRED("pdo")
  36. ZEND_MOD_END
  37. };
  38. /* }}} */
  39. zend_module_entry pdo_firebird_module_entry = { /* {{{ */
  40. STANDARD_MODULE_HEADER_EX, NULL,
  41. pdo_firebird_deps,
  42. "PDO_Firebird",
  43. pdo_firebird_functions,
  44. PHP_MINIT(pdo_firebird),
  45. PHP_MSHUTDOWN(pdo_firebird),
  46. NULL,
  47. NULL,
  48. PHP_MINFO(pdo_firebird),
  49. "0.3",
  50. STANDARD_MODULE_PROPERTIES
  51. };
  52. /* }}} */
  53. #ifdef COMPILE_DL_PDO_FIREBIRD
  54. ZEND_GET_MODULE(pdo_firebird)
  55. #endif
  56. PHP_MINIT_FUNCTION(pdo_firebird) /* {{{ */
  57. {
  58. REGISTER_PDO_CLASS_CONST_LONG("FB_ATTR_DATE_FORMAT", (long) PDO_FB_ATTR_DATE_FORMAT);
  59. REGISTER_PDO_CLASS_CONST_LONG("FB_ATTR_TIME_FORMAT", (long) PDO_FB_ATTR_TIME_FORMAT);
  60. REGISTER_PDO_CLASS_CONST_LONG("FB_ATTR_TIMESTAMP_FORMAT", (long) PDO_FB_ATTR_TIMESTAMP_FORMAT);
  61. php_pdo_register_driver(&pdo_firebird_driver);
  62. return SUCCESS;
  63. }
  64. /* }}} */
  65. PHP_MSHUTDOWN_FUNCTION(pdo_firebird) /* {{{ */
  66. {
  67. php_pdo_unregister_driver(&pdo_firebird_driver);
  68. return SUCCESS;
  69. }
  70. /* }}} */
  71. PHP_MINFO_FUNCTION(pdo_firebird) /* {{{ */
  72. {
  73. php_info_print_table_start();
  74. php_info_print_table_header(2, "PDO Driver for Firebird", "enabled");
  75. php_info_print_table_end();
  76. }
  77. /* }}} */
  78. /*
  79. * Local variables:
  80. * tab-width: 4
  81. * c-basic-offset: 4
  82. * End:
  83. * vim600: noet sw=4 ts=4 fdm=marker
  84. * vim<600: noet sw=4 ts=4
  85. */