+/* implements Iterator */
+
+/* {{{ proto bool HttpRequestPool::valid()
+ *
+ * Implements Iterator::valid().
+ */
+PHP_METHOD(HttpRequestPool, valid)
+{
+ NO_ARGS;
+
+ IF_RETVAL_USED {
+ getObject(http_requestpool_object, obj);
+ RETURN_BOOL(obj->iterator.pos < zend_llist_count(&obj->pool.handles));
+ }
+}
+/* }}} */
+
+/* {{{ proto HttpRequest HttpRequestPool::current()
+ *
+ * Implements Iterator::current().
+ */
+PHP_METHOD(HttpRequestPool, current)
+{
+ NO_ARGS;
+
+ IF_RETVAL_USED {
+ long pos = 0;
+ zval **current = NULL;
+ zend_llist_position lpos;
+ getObject(http_requestpool_object, obj);
+
+ if (obj->iterator.pos < zend_llist_count(&obj->pool.handles)) {
+ for ( current = zend_llist_get_first_ex(&obj->pool.handles, &lpos);
+ current && obj->iterator.pos != pos++;
+ current = zend_llist_get_next_ex(&obj->pool.handles, &lpos));
+ if (current) {
+ RETURN_OBJECT(*current);
+ }
+ }
+ RETURN_NULL();
+ }
+}
+/* }}} */
+
+/* {{{ proto long HttpRequestPool::key()
+ *
+ * Implements Iterator::key().
+ */
+PHP_METHOD(HttpRequestPool, key)
+{
+ NO_ARGS;
+
+ IF_RETVAL_USED {
+ getObject(http_requestpool_object, obj);
+ RETURN_LONG(obj->iterator.pos);
+ }
+}
+/* }}} */
+
+/* {{{ proto void HttpRequestPool::next()
+ *
+ * Implements Iterator::next().
+ */
+PHP_METHOD(HttpRequestPool, next)
+{
+ NO_ARGS {
+ getObject(http_requestpool_object, obj);
+ ++(obj->iterator.pos);
+ }
+}
+/* }}} */
+
+/* {{{ proto void HttpRequestPool::rewind()
+ *
+ * Implements Iterator::rewind().
+ */
+PHP_METHOD(HttpRequestPool, rewind)
+{
+ NO_ARGS {
+ getObject(http_requestpool_object, obj);
+ obj->iterator.pos = 0;
+ }
+}
+/* }}} */
+