]> granicus.if.org Git - php/commitdiff
- Show that PDOStatement implements Traversable
authorMarcus Boerger <helly@php.net>
Wed, 23 Feb 2005 00:52:14 +0000 (00:52 +0000)
committerMarcus Boerger <helly@php.net>
Wed, 23 Feb 2005 00:52:14 +0000 (00:52 +0000)
ext/pdo/pdo.c

index 74b7fbd93ebc2d6250865b180f7bec19a44869c7..36dbd2bd5ca1b81eae8200d2503c86c485bb1ba0 100755 (executable)
@@ -32,6 +32,7 @@
 #include "php_pdo_driver.h"
 #include "php_pdo_int.h"
 #include "zend_exceptions.h"
+#include "zend_interfaces.h"
 
 #if defined(HAVE_SPL) && ((PHP_MAJOR_VERSION > 5) || (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 1))
 extern PHPAPI zend_class_entry *spl_ce_RuntimeException;
@@ -306,6 +307,7 @@ PHP_MINIT_FUNCTION(pdo)
        pdo_dbstmt_ce = zend_register_internal_class(&ce TSRMLS_CC);
        pdo_dbstmt_ce->get_iterator = pdo_stmt_iter_get;
        pdo_dbstmt_ce->create_object = pdo_dbstmt_new;
+       zend_class_implements(pdo_dbstmt_ce TSRMLS_CC, 1, zend_ce_traversable); 
 
        INIT_CLASS_ENTRY(ce, "PDORow", pdo_row_functions);
        pdo_row_ce = zend_register_internal_class(&ce TSRMLS_CC);