INNER CODE UNIT · C
parent_state
mongodb/mongo-php-driver · src/phongo_bson.c:749
phongo_bson_state* parent_state = (phongo_bson_state*) data;
phongo_bson_state state;
phongo_field_path_push(parent_state->field_path, key, PHONGO_FIELD_PATH_ITEM_DOCUMENT);
PHONGO_BSON_INIT_STATE(state);
phongo_bson_state_copy_ctor(&state, parent_state);
/* Check for entries in the fieldPath type map key, and use them to
* override the default ones for this type */
phongo_handle_field_path_entry_for_compound_type(&state, &state.map.document);
/* Only traverse BSON document if we're not returning a raw BSON structure */
if (state.field_type.type != PHONGO_TYPEMAP_BSON) {
if (!bson_iter_init(&child, v_document)) {
phongo_bson_state_dtor(&state);
return false;
}