Back to index

php5  5.3.10
Classes | Functions
resourcebundle_iterator.h File Reference
#include <zend.h>
#include "resourcebundle/resourcebundle_class.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


struct  ResourceBundle_iterator


zend_object_iterator * resourcebundle_get_iterator (zend_class_entry *ce, zval *object, int byref TSRMLS_DC)

Class Documentation

struct ResourceBundle_iterator

Definition at line 24 of file resourcebundle_iterator.h.

Collaboration diagram for ResourceBundle_iterator:
Class Members
zval * current
char * currentkey
long i
zend_object_iterator intern
zend_bool is_table
long length
ResourceBundle_object * subject

Function Documentation

zend_object_iterator* resourcebundle_get_iterator ( zend_class_entry *  ce,
zval *  object,
int byref  TSRMLS_DC 

Definition at line 156 of file resourcebundle_iterator.c.

       ResourceBundle_object   *rb = (ResourceBundle_object *) zend_object_store_get_object( object TSRMLS_CC );
       ResourceBundle_iterator *iterator = emalloc( sizeof( ResourceBundle_iterator ) );

       if (byref) {
            php_error( E_ERROR, "ResourceBundle does not support writable iterators" );

       iterator-> = (void *) object;
       iterator->intern.funcs = &resourcebundle_iterator_funcs;

       iterator->subject = rb;

       /* The iterated rb can only be either URES_TABLE or URES_ARRAY
        * All other types are returned as php primitives!
       iterator->is_table = (ures_getType( rb->me ) == URES_TABLE);
       iterator->length = ures_getSize( rb->me );

       iterator->current = NULL;
       iterator->currentkey = NULL;
       iterator->i = 0;

       return (zend_object_iterator *) iterator;

Here is the call graph for this function:

Here is the caller graph for this function: