#include "map.h"
#include <Zend/zend_API.h>
#include <Zend/zend_interfaces.h>
#include <ext/spl/spl_iterators.h>
#include "arena.h"
#include "convert.h"
#include "message.h"
#include "php-upb.h"
#include "protobuf.h"
Go to the source code of this file.
Classes | |
struct | MapField |
struct | MapFieldIter |
Variables | |
static zend_function_entry | map_field_iter_methods [] |
zend_class_entry * | MapField_class_entry |
static zend_function_entry | MapField_methods [] |
static zend_object_handlers | MapField_object_handlers |
zend_class_entry * | MapFieldIter_class_entry |
static zend_object_handlers | MapFieldIter_object_handlers |
|
static |
Definition at line 64 of file protobuf/php/ext/google/protobuf/map.c.
|
static |
MapFieldIter_dtor()
Object handler to destroy a MapFieldIter. 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 512 of file protobuf/php/ext/google/protobuf/map.c.
|
static |
Definition at line 159 of file protobuf/php/ext/google/protobuf/map.c.
|
static |
Definition at line 154 of file protobuf/php/ext/google/protobuf/map.c.
void Map_ModuleInit | ( | ) |
Called when the C extension is loaded to register all types.
Definition at line 631 of file protobuf/php/ext/google/protobuf/map.c.
Definition at line 236 of file protobuf/php/ext/google/protobuf/map.c.
|
static |
Object handler for cloning an object in PHP. Called when PHP code does:
$map2 = clone $map1;
Definition at line 136 of file protobuf/php/ext/google/protobuf/map.c.
|
static |
Object handler for comparing two repeated field objects. Called whenever PHP code does:
$map1 == $map2
Definition at line 119 of file protobuf/php/ext/google/protobuf/map.c.
|
static |
PHP class entry function to allocate and initialize a new MapField object.
Definition at line 87 of file protobuf/php/ext/google/protobuf/map.c.
|
static |
MapField_dtor()
Object handler to destroy a MapField. 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 104 of file protobuf/php/ext/google/protobuf/map.c.
void MapField_GetPhpWrapper | ( | zval * | val, |
upb_map * | map, | ||
MapField_Type | type, | ||
zval * | arena | ||
) |
Definition at line 167 of file protobuf/php/ext/google/protobuf/map.c.
upb_map* MapField_GetUpbMap | ( | zval * | val, |
MapField_Type | type, | ||
upb_arena * | arena | ||
) |
Definition at line 187 of file protobuf/php/ext/google/protobuf/map.c.
zend_object* MapFieldIter_create | ( | zend_class_entry * | class_type | ) |
PHP class entry function to allocate and initialize a new MapFieldIter object.
Definition at line 495 of file protobuf/php/ext/google/protobuf/map.c.
|
static |
Function to create a MapFieldIter directly from C.
Definition at line 523 of file protobuf/php/ext/google/protobuf/map.c.
|
static |
Definition at line 60 of file protobuf/php/ext/google/protobuf/map.c.
MapField_Type MapType_Get | ( | const upb_fielddef * | f | ) |
Definition at line 69 of file protobuf/php/ext/google/protobuf/map.c.
PHP_METHOD | ( | MapField | , |
__construct | |||
) |
MapField::__construct()
Constructs an instance of MapField.
long | Key type. |
long | Value type. |
string | Message/Enum class (message/enum value types only). |
Definition at line 266 of file protobuf/php/ext/google/protobuf/map.c.
MapField::count()
Implements the Countable interface. Invoked when PHP code calls:
$len = count($map); Return the number of stored elements. This will also be called for: count($map)
Definition at line 425 of file protobuf/php/ext/google/protobuf/map.c.
PHP_METHOD | ( | MapField | , |
getIterator | |||
) |
MapField::getIterator()
Implements the IteratorAggregate interface. Invoked when PHP code calls:
foreach ($arr) {}
Definition at line 444 of file protobuf/php/ext/google/protobuf/map.c.
PHP_METHOD | ( | MapField | , |
offsetExists | |||
) |
MapField::offsetExists()
Implements the ArrayAccess interface. Invoked when PHP code calls:
isset($map[$idx]); empty($map[$idx]);
long | The index to be checked. |
Definition at line 318 of file protobuf/php/ext/google/protobuf/map.c.
PHP_METHOD | ( | MapField | , |
offsetGet | |||
) |
MapField::offsetGet()
Implements the ArrayAccess interface. Invoked when PHP code calls:
$x = $map[$idx];
long | The index of the element to be fetched. |
Invalid | type for index. |
Non-existing | index. |
Definition at line 343 of file protobuf/php/ext/google/protobuf/map.c.
PHP_METHOD | ( | MapField | , |
offsetSet | |||
) |
MapField::offsetSet()
Implements the ArrayAccess interface. Invoked when PHP code calls:
$map[$idx] = $x;
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 376 of file protobuf/php/ext/google/protobuf/map.c.
PHP_METHOD | ( | MapField | , |
offsetUnset | |||
) |
MapField::offsetUnset()
Implements the ArrayAccess interface. Invoked when PHP code calls:
unset($map[$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 MapField. |
Definition at line 402 of file protobuf/php/ext/google/protobuf/map.c.
PHP_METHOD | ( | MapFieldIter | , |
current | |||
) |
MapFieldIter::current()
Implements the Iterator interface. Returns the current value.
Definition at line 566 of file protobuf/php/ext/google/protobuf/map.c.
PHP_METHOD | ( | MapFieldIter | , |
key | |||
) |
MapFieldIter::key()
Implements the Iterator interface. Returns the current key.
Definition at line 580 of file protobuf/php/ext/google/protobuf/map.c.
PHP_METHOD | ( | MapFieldIter | , |
next | |||
) |
MapFieldIter::next()
Implements the Iterator interface. Advances to the next element.
Definition at line 594 of file protobuf/php/ext/google/protobuf/map.c.
PHP_METHOD | ( | MapFieldIter | , |
rewind | |||
) |
MapFieldIter::rewind()
Implements the Iterator interface. Sets the iterator to the first element.
Definition at line 554 of file protobuf/php/ext/google/protobuf/map.c.
PHP_METHOD | ( | MapFieldIter | , |
valid | |||
) |
MapFieldIter::valid()
Implements the Iterator interface. Returns true if this is a valid element.
Definition at line 605 of file protobuf/php/ext/google/protobuf/map.c.
|
static |
Definition at line 612 of file protobuf/php/ext/google/protobuf/map.c.
zend_class_entry* MapField_class_entry |
Definition at line 57 of file protobuf/php/ext/google/protobuf/map.c.
|
static |
Definition at line 465 of file protobuf/php/ext/google/protobuf/map.c.
|
static |
Definition at line 58 of file protobuf/php/ext/google/protobuf/map.c.
zend_class_entry* MapFieldIter_class_entry |
Definition at line 486 of file protobuf/php/ext/google/protobuf/map.c.
|
static |
Definition at line 487 of file protobuf/php/ext/google/protobuf/map.c.