summaryrefslogtreecommitdiff
path: root/ext/pdo/pdo.c
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2006-05-11 22:43:44 +0000
committerMarcus Boerger <helly@php.net>2006-05-11 22:43:44 +0000
commit7bbab02633f2f89285115be576e5183b66b303ce (patch)
tree02f9ba2856ee073b93e68d939e06df63c6d8079d /ext/pdo/pdo.c
parent7412202c43e74d24c55669dedc36542e43b4f2bb (diff)
downloadphp-git-7bbab02633f2f89285115be576e5183b66b303ce.tar.gz
- MFH
. Fix iterator based access . Add new attribute ATTR_DEFAULT_FETCH_MODE: $bdh->setAttribute() . Add new fetch mode: FETCH_PROPS_LATE, this fills object member variables after calling the constructor (fixes #36428).
Diffstat (limited to 'ext/pdo/pdo.c')
-rwxr-xr-xext/pdo/pdo.c22
1 files changed, 17 insertions, 5 deletions
diff --git a/ext/pdo/pdo.c b/ext/pdo/pdo.c
index a41dce27e3..99f658378c 100755
--- a/ext/pdo/pdo.c
+++ b/ext/pdo/pdo.c
@@ -53,11 +53,23 @@ int php_pdo_list_entry(void)
/* for exceptional circumstances */
zend_class_entry *pdo_exception_ce;
-PDO_API zend_class_entry *php_pdo_get_exception(void)
+PDO_API zend_class_entry *php_pdo_get_dbh_ce()
+{
+ return pdo_dbh_ce;
+}
+
+PDO_API zend_class_entry *php_pdo_get_exception()
{
return pdo_exception_ce;
}
+PDO_API char *php_pdo_str_tolower_dup(const char *src, int len)
+{
+ char *dest = emalloc(len + 1);
+ zend_str_tolower_copy(dest, src, len);
+ return dest;
+}
+
PDO_API zend_class_entry *php_pdo_get_exception_base(int root TSRMLS_DC)
{
#if can_handle_soft_dependency_on_SPL && defined(HAVE_SPL) && ((PHP_MAJOR_VERSION > 5) || (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 1))
@@ -74,7 +86,7 @@ PDO_API zend_class_entry *php_pdo_get_exception_base(int root TSRMLS_DC)
}
}
#endif
-#if (PHP_MAJOR_VERSION <= 5) && (PHP_MINOR_VERSION < 2)
+#if (PHP_MAJOR_VERSION == 5) && (PHP_MINOR_VERSION < 2)
return zend_exception_get_default();
#else
return zend_exception_get_default(TSRMLS_C);
@@ -83,7 +95,7 @@ PDO_API zend_class_entry *php_pdo_get_exception_base(int root TSRMLS_DC)
zend_class_entry *pdo_dbh_ce, *pdo_dbstmt_ce, *pdo_row_ce;
-/* proto array pdo_drivers()
+/* {{{ proto array pdo_drivers()
Return array of available PDO drivers */
PHP_FUNCTION(pdo_drivers)
{
@@ -133,7 +145,7 @@ zend_module_entry pdo_module_entry = {
PHP_RINIT(pdo),
PHP_RSHUTDOWN(pdo),
PHP_MINFO(pdo),
- "1.0.3",
+ "1.0.4dev",
STANDARD_MODULE_PROPERTIES
};
/* }}} */
@@ -303,7 +315,7 @@ PDO_API char *php_pdo_int64_to_str(pdo_int64_t i64 TSRMLS_DC)
PHP_MINIT_FUNCTION(pdo)
{
zend_class_entry ce;
-
+
spl_ce_RuntimeException = NULL;
ZEND_INIT_MODULE_GLOBALS(pdo, php_pdo_init_globals, NULL);