Functions | Variables
array.c File Reference
#include <ext/spl/spl_iterators.h>
#include <Zend/zend_API.h>
#include <Zend/zend_interfaces.h>
#include "protobuf.h"
Include dependency graph for array.c:

Go to the source code of this file.

Functions

 PHP_METHOD (RepeatedField, __construct)
 
 PHP_METHOD (RepeatedField, append)
 
 PHP_METHOD (RepeatedField, count)
 
 PHP_METHOD (RepeatedField, getIterator)
 
 PHP_METHOD (RepeatedField, offsetExists)
 
 PHP_METHOD (RepeatedField, offsetGet)
 
 PHP_METHOD (RepeatedField, offsetSet)
 
 PHP_METHOD (RepeatedField, offsetUnset)
 
 PHP_METHOD (RepeatedFieldIter, current)
 
 PHP_METHOD (RepeatedFieldIter, key)
 
 PHP_METHOD (RepeatedFieldIter, next)
 
 PHP_METHOD (RepeatedFieldIter, valid)
 
static void php_proto_array_default_release (void *value)
 
static void php_proto_array_object_release (void *value)
 
 PHP_PROTO_INIT_CLASS_START ("Google\\Protobuf\\Internal\\RepeatedField", RepeatedField, repeated_field)
 
 PHP_PROTO_INIT_CLASS_START ("Google\\Protobuf\\Internal\\RepeatedFieldIter", PHP_PROTO_INIT_CLASS_ENDPHP_METHOD(RepeatedFieldIter, repeated_field_iter)
 
 php_proto_zval_ptr_dtor (intern->array)
 
static int repeated_field_array_init (zval *array, upb_fieldtype_t type, uint size ZEND_FILE_LINE_DC)
 
static zend_object_value repeated_field_create (zend_class_entry *ce TSRMLS_DC)
 
void repeated_field_create_with_field (zend_class_entry *ce, const upb_fielddef *field, CACHED_VALUE *repeated_field PHP_PROTO_TSRMLS_DC)
 
void repeated_field_create_with_type (zend_class_entry *ce, upb_fieldtype_t type, const zend_class_entry *msg_ce, CACHED_VALUE *repeated_field PHP_PROTO_TSRMLS_DC)
 
static HashTable * repeated_field_get_gc (zval *object, CACHED_VALUE **table, int *n TSRMLS_DC)
 
static HashTable * repeated_field_get_gc (zval *object, zval ***table, int *n TSRMLS_DC)
 
static int repeated_field_has_dimension (zval *object, zval *offset TSRMLS_DC)
 
voidrepeated_field_index_native (RepeatedField *intern, int index TSRMLS_DC)
 
static zend_object_value repeated_field_iter_create (zend_class_entry *ce TSRMLS_DC)
 
void repeated_field_push_native (RepeatedField *intern, void *value)
 
static void repeated_field_write_dimension (zval *object, zval *offset, zval *value TSRMLS_DC)
 

Variables

PHP_PROTO_OBJECT_FREE_END PHP_PROTO_OBJECT_DTOR_END intern array = NULL
 
intern msg_ce = NULL
 
intern position = 0
 
PHP_PROTO_OBJECT_FREE_END PHP_PROTO_OBJECT_DTOR_END intern repeated_field = NULL
 
zend_object_handlers * repeated_field_handlers
 
zend_object_handlers * repeated_field_iter_handlers
 
static zend_function_entry repeated_field_iter_methods []
 
zend_class_entry * repeated_field_iter_type
 
static zend_function_entry repeated_field_methods []
 
zend_class_entry * repeated_field_type
 
intern type = 0
 

Function Documentation

◆ PHP_METHOD() [1/12]

PHP_METHOD ( RepeatedField  ,
__construct   
)

Constructs an instance of RepeatedField.

Parameters
longType of the stored element.
stringMessage/Enum class name (message/enum fields only).

Definition at line 301 of file array.c.

◆ PHP_METHOD() [2/12]

PHP_METHOD ( RepeatedField  ,
append   
)

Append element to the end of the repeated field.

Parameters
objectThe element to be added.

Definition at line 333 of file array.c.

◆ PHP_METHOD() [3/12]

PHP_METHOD ( RepeatedField  ,
count   
)

Return the number of stored elements. This will also be called for: count($arr)

Returns
long The number of stored elements.

Definition at line 448 of file array.c.

◆ PHP_METHOD() [4/12]

PHP_METHOD ( RepeatedField  ,
getIterator   
)

Return the beginning iterator. This will also be called for: foreach($arr)

Returns
object Beginning iterator.

Definition at line 463 of file array.c.

◆ PHP_METHOD() [5/12]

PHP_METHOD ( RepeatedField  ,
offsetExists   
)

Check whether the element at given index exists.

Parameters
longThe index to be checked.
Returns
bool True if the element at the given index exists.

Definition at line 348 of file array.c.

◆ PHP_METHOD() [6/12]

PHP_METHOD ( RepeatedField  ,
offsetGet   
)

Return the element at the given index. This will also be called for: $ele = $arr[0]

Parameters
longThe index of the element to be fetched.
Returns
object The stored element at given index.
Exceptions
Invalidtype for index.
Non-existingindex.

Definition at line 370 of file array.c.

◆ PHP_METHOD() [7/12]

PHP_METHOD ( RepeatedField  ,
offsetSet   
)

Assign the element at the given index. This will also be called for: $arr []= $ele and $arr[0] = ele

Parameters
longThe index of the element to be assigned.
objectThe element to be assigned.
Exceptions
Invalidtype for index.
Non-existingindex.
Incorrecttype of the element.

Definition at line 408 of file array.c.

◆ PHP_METHOD() [8/12]

PHP_METHOD ( RepeatedField  ,
offsetUnset   
)

Remove the element at the given index. This will also be called for: unset($arr)

Parameters
longThe index of the element to be removed.
Exceptions
Invalidtype for index.
Theelement to be removed is not at the end of the RepeatedField.

Definition at line 424 of file array.c.

◆ PHP_METHOD() [9/12]

PHP_METHOD ( RepeatedFieldIter  ,
current   
)

Definition at line 505 of file array.c.

◆ PHP_METHOD() [10/12]

PHP_METHOD ( RepeatedFieldIter  ,
key   
)

Definition at line 531 of file array.c.

◆ PHP_METHOD() [11/12]

PHP_METHOD ( RepeatedFieldIter  ,
next   
)

Definition at line 536 of file array.c.

◆ PHP_METHOD() [12/12]

PHP_METHOD ( RepeatedFieldIter  ,
valid   
)

Definition at line 541 of file array.c.

◆ php_proto_array_default_release()

static void php_proto_array_default_release ( void value)
inlinestatic

Definition at line 135 of file array.c.

◆ php_proto_array_object_release()

static void php_proto_array_object_release ( void value)
inlinestatic

Definition at line 132 of file array.c.

◆ PHP_PROTO_INIT_CLASS_START() [1/2]

PHP_PROTO_INIT_CLASS_START ( "Google\\Protobuf\\Internal\\RepeatedField"  ,
RepeatedField  ,
repeated_field   
)

Definition at line 118 of file array.c.

◆ PHP_PROTO_INIT_CLASS_START() [2/2]

PHP_PROTO_INIT_CLASS_START ( "Google\\Protobuf\\Internal\\RepeatedFieldIter"  ,
PHP_PROTO_INIT_CLASS_ENDPHP_METHOD(  RepeatedFieldIter,
repeated_field_iter   
)

Definition at line 491 of file array.c.

◆ php_proto_zval_ptr_dtor()

php_proto_zval_ptr_dtor ( intern->  array)

◆ repeated_field_array_init()

static int repeated_field_array_init ( zval *  array,
upb_fieldtype_t  type,
uint size  ZEND_FILE_LINE_DC 
)
static

Definition at line 153 of file array.c.

◆ repeated_field_create()

static zend_object_value repeated_field_create ( zend_class_entry *ce  TSRMLS_DC)
static

◆ repeated_field_create_with_field()

void repeated_field_create_with_field ( zend_class_entry *  ce,
const upb_fielddef field,
CACHED_VALUE *repeated_field  PHP_PROTO_TSRMLS_DC 
)

Definition at line 262 of file array.c.

◆ repeated_field_create_with_type()

void repeated_field_create_with_type ( zend_class_entry *  ce,
upb_fieldtype_t  type,
const zend_class_entry *  msg_ce,
CACHED_VALUE *repeated_field  PHP_PROTO_TSRMLS_DC 
)

Definition at line 271 of file array.c.

◆ repeated_field_get_gc() [1/2]

static HashTable* repeated_field_get_gc ( zval *  object,
CACHED_VALUE **  table,
int *n  TSRMLS_DC 
)
static

◆ repeated_field_get_gc() [2/2]

static HashTable* repeated_field_get_gc ( zval *  object,
zval ***  table,
int *n  TSRMLS_DC 
)
static

Definition at line 216 of file array.c.

◆ repeated_field_has_dimension()

static int repeated_field_has_dimension ( zval *  object,
zval *offset  TSRMLS_DC 
)
static

◆ repeated_field_index_native()

void* repeated_field_index_native ( RepeatedField intern,
int index  TSRMLS_DC 
)

Definition at line 231 of file array.c.

◆ repeated_field_iter_create()

static zend_object_value repeated_field_iter_create ( zend_class_entry *ce  TSRMLS_DC)
static

◆ repeated_field_push_native()

void repeated_field_push_native ( RepeatedField intern,
void value 
)

Definition at line 252 of file array.c.

◆ repeated_field_write_dimension()

static void repeated_field_write_dimension ( zval *  object,
zval *  offset,
zval *value  TSRMLS_DC 
)
static

Definition at line 178 of file array.c.

Variable Documentation

◆ array

Definition at line 111 of file array.c.

◆ msg_ce

const zend_class_entry * msg_ce = NULL

Definition at line 114 of file array.c.

◆ position

intern position = 0

Definition at line 487 of file array.c.

◆ repeated_field

Definition at line 486 of file array.c.

◆ repeated_field_handlers

zend_object_handlers* repeated_field_handlers

Definition at line 93 of file array.c.

◆ repeated_field_iter_handlers

zend_object_handlers* repeated_field_iter_handlers

Definition at line 94 of file array.c.

◆ repeated_field_iter_methods

zend_function_entry repeated_field_iter_methods[]
static
Initial value:
= {
ZEND_FE_END
}

Definition at line 61 of file array.c.

◆ repeated_field_iter_type

zend_class_entry* repeated_field_iter_type

Definition at line 92 of file array.c.

◆ repeated_field_methods

zend_function_entry repeated_field_methods[]
static
Initial value:
= {
ZEND_FE_END
}

Definition at line 49 of file array.c.

◆ repeated_field_type

zend_class_entry* repeated_field_type

Definition at line 91 of file array.c.

◆ type

intern type = 0

Definition at line 113 of file array.c.



libaditof
Author(s):
autogenerated on Wed May 21 2025 02:07:02