#include "array.h"
#include <Zend/zend_API.h>
#include <Zend/zend_interfaces.h>
#include <ext/spl/spl_iterators.h>
#include <Zend/zend_exceptions.h>
#include "arena.h"
#include "convert.h"
#include "def.h"
#include "message.h"
#include "php-upb.h"
#include "protobuf.h"
Go to the source code of this file.
Classes | |
struct | RepeatedField |
struct | RepeatedFieldIter |
Variables | |
static zend_function_entry | repeated_field_iter_methods [] |
static zend_object_handlers | repeated_field_iter_object_handlers |
static zend_function_entry | repeated_field_methods [] |
zend_class_entry * | RepeatedField_class_entry |
static zend_object_handlers | RepeatedField_object_handlers |
zend_class_entry * | RepeatedFieldIter_class_entry |
void Array_ModuleInit | ( | ) |
Called when the C extension is loaded to register all types.
Definition at line 634 of file protobuf/php/ext/google/protobuf/array.c.
Definition at line 217 of file protobuf/php/ext/google/protobuf/array.c.
PHP_METHOD | ( | RepeatedField | , |
__construct | |||
) |
RepeatedField::__construct()
Constructs an instance of RepeatedField.
long | Type of the stored element. |
string | Message/Enum class. |
Definition at line 246 of file protobuf/php/ext/google/protobuf/array.c.
PHP_METHOD | ( | RepeatedField | , |
append | |||
) |
RepeatedField::append()
Append element to the end of the repeated field.
object | The element to be added. |
Definition at line 275 of file protobuf/php/ext/google/protobuf/array.c.
PHP_METHOD | ( | RepeatedField | , |
count | |||
) |
RepeatedField::count()
Implements the Countable interface. Invoked when PHP code calls:
$len = count($arr); Return the number of stored elements. This will also be called for: count($arr)
Definition at line 428 of file protobuf/php/ext/google/protobuf/array.c.
PHP_METHOD | ( | RepeatedField | , |
getIterator | |||
) |
RepeatedField::getIterator()
Implements the IteratorAggregate interface. Invoked when PHP code calls:
foreach ($arr) {}
Definition at line 447 of file protobuf/php/ext/google/protobuf/array.c.
PHP_METHOD | ( | RepeatedField | , |
offsetExists | |||
) |
RepeatedField::offsetExists()
Implements the ArrayAccess interface. Invoked when PHP code calls:
isset($arr[$idx]); empty($arr[$idx]);
long | The index to be checked. |
Definition at line 300 of file protobuf/php/ext/google/protobuf/array.c.
PHP_METHOD | ( | RepeatedField | , |
offsetGet | |||
) |
RepeatedField::offsetGet()
Implements the ArrayAccess interface. Invoked when PHP code calls:
$x = $arr[$idx];
long | The index of the element to be fetched. |
Invalid | type for index. |
Non-existing | index. |
Definition at line 323 of file protobuf/php/ext/google/protobuf/array.c.
PHP_METHOD | ( | RepeatedField | , |
offsetSet | |||
) |
RepeatedField::offsetSet()
Implements the ArrayAccess interface. Invoked when PHP code calls:
$arr[$idx] = $x; $arr []= $x; // Append
long | The index of the element to be assigned. |
object | The element to be assigned. |
Invalid | type for index. |
Non-existing | index. |
Incorrect | type of the element. |
Definition at line 357 of file protobuf/php/ext/google/protobuf/array.c.
PHP_METHOD | ( | RepeatedField | , |
offsetUnset | |||
) |
RepeatedField::offsetUnset()
Implements the ArrayAccess interface. Invoked when PHP code calls:
unset($arr[$idx]);
long | The index of the element to be removed. |
Invalid | type for index. |
The | element to be removed is not at the end of the RepeatedField. |
Definition at line 399 of file protobuf/php/ext/google/protobuf/array.c.
PHP_METHOD | ( | RepeatedFieldIter | , |
current | |||
) |
RepeatedFieldIter::current()
Implements the Iterator interface. Returns the current value.
Definition at line 567 of file protobuf/php/ext/google/protobuf/array.c.
PHP_METHOD | ( | RepeatedFieldIter | , |
key | |||
) |
RepeatedFieldIter::key()
Implements the Iterator interface. Returns the current key.
Definition at line 590 of file protobuf/php/ext/google/protobuf/array.c.
PHP_METHOD | ( | RepeatedFieldIter | , |
next | |||
) |
RepeatedFieldIter::next()
Implements the Iterator interface. Advances to the next element.
Definition at line 600 of file protobuf/php/ext/google/protobuf/array.c.
PHP_METHOD | ( | RepeatedFieldIter | , |
rewind | |||
) |
RepeatedFieldIter::rewind()
Implements the Iterator interface. Sets the iterator to the first element.
Definition at line 557 of file protobuf/php/ext/google/protobuf/array.c.
PHP_METHOD | ( | RepeatedFieldIter | , |
valid | |||
) |
RepeatedFieldIter::valid()
Implements the Iterator interface. Returns true if this is a valid element.
Definition at line 610 of file protobuf/php/ext/google/protobuf/array.c.
|
static |
Object handler for cloning an object in PHP. Called when PHP code does:
$rf2 = clone $rf1;
Definition at line 121 of file protobuf/php/ext/google/protobuf/array.c.
|
static |
RepeatedField_compare_objects()
Object handler for comparing two repeated field objects. Called whenever PHP code does:
$rf1 == $rf2
Definition at line 104 of file protobuf/php/ext/google/protobuf/array.c.
|
static |
PHP class entry function to allocate and initialize a new RepeatedField object.
Definition at line 72 of file protobuf/php/ext/google/protobuf/array.c.
|
static |
RepeatedField_dtor()
Object handler to destroy a RepeatedField. This releases all resources associated with the message. Note that it is possible to access a destroyed object from PHP in rare cases.
Definition at line 89 of file protobuf/php/ext/google/protobuf/array.c.
Definition at line 152 of file protobuf/php/ext/google/protobuf/array.c.
|
static |
Definition at line 138 of file protobuf/php/ext/google/protobuf/array.c.
|
static |
Definition at line 142 of file protobuf/php/ext/google/protobuf/array.c.
Definition at line 172 of file protobuf/php/ext/google/protobuf/array.c.
zend_object* RepeatedFieldIter_create | ( | zend_class_entry * | class_type | ) |
PHP class entry function to allocate and initialize a new RepeatedFieldIter object.
Definition at line 502 of file protobuf/php/ext/google/protobuf/array.c.
|
static |
Object handler to destroy a RepeatedFieldIter. This releases all resources associated with the message. Note that it is possible to access a destroyed object from PHP in rare cases.
Definition at line 519 of file protobuf/php/ext/google/protobuf/array.c.
|
static |
C function to create a RepeatedFieldIter.
Definition at line 530 of file protobuf/php/ext/google/protobuf/array.c.
|
static |
Definition at line 616 of file protobuf/php/ext/google/protobuf/array.c.
|
static |
Definition at line 494 of file protobuf/php/ext/google/protobuf/array.c.
|
static |
Definition at line 471 of file protobuf/php/ext/google/protobuf/array.c.
zend_class_entry* RepeatedField_class_entry |
Definition at line 61 of file protobuf/php/ext/google/protobuf/array.c.
|
static |
Definition at line 62 of file protobuf/php/ext/google/protobuf/array.c.
zend_class_entry* RepeatedFieldIter_class_entry |
Definition at line 493 of file protobuf/php/ext/google/protobuf/array.c.