|
|
|
@ -287,7 +287,7 @@ PHP_METHOD(RepeatedField, append) { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* RepeatedField::offsetExists() |
|
|
|
|
* RepeatedField::offsetExists(): bool |
|
|
|
|
* |
|
|
|
|
* Implements the ArrayAccess interface. Invoked when PHP code calls: |
|
|
|
|
* |
|
|
|
@ -309,7 +309,7 @@ PHP_METHOD(RepeatedField, offsetExists) { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* RepeatedField::offsetGet() |
|
|
|
|
* RepeatedField::offsetGet(): mixed |
|
|
|
|
* |
|
|
|
|
* Implements the ArrayAccess interface. Invoked when PHP code calls: |
|
|
|
|
* |
|
|
|
@ -341,7 +341,7 @@ PHP_METHOD(RepeatedField, offsetGet) { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* RepeatedField::offsetSet() |
|
|
|
|
* RepeatedField::offsetSet(): void |
|
|
|
|
* |
|
|
|
|
* Implements the ArrayAccess interface. Invoked when PHP code calls: |
|
|
|
|
* |
|
|
|
@ -386,7 +386,7 @@ PHP_METHOD(RepeatedField, offsetSet) { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* RepeatedField::offsetUnset() |
|
|
|
|
* RepeatedField::offsetUnset(): void |
|
|
|
|
* |
|
|
|
|
* Implements the ArrayAccess interface. Invoked when PHP code calls: |
|
|
|
|
* |
|
|
|
@ -416,7 +416,7 @@ PHP_METHOD(RepeatedField, offsetUnset) { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* RepeatedField::count() |
|
|
|
|
* RepeatedField::count(): int |
|
|
|
|
* |
|
|
|
|
* Implements the Countable interface. Invoked when PHP code calls: |
|
|
|
|
* |
|
|
|
@ -436,7 +436,7 @@ PHP_METHOD(RepeatedField, count) { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* RepeatedField::getIterator() |
|
|
|
|
* RepeatedField::getIterator(): Traversable |
|
|
|
|
* |
|
|
|
|
* Implements the IteratorAggregate interface. Invoked when PHP code calls: |
|
|
|
|
* |
|
|
|
@ -459,24 +459,38 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_append, 0, 0, 1) |
|
|
|
|
ZEND_ARG_INFO(0, newval) |
|
|
|
|
ZEND_END_ARG_INFO() |
|
|
|
|
|
|
|
|
|
ZEND_BEGIN_ARG_INFO_EX(arginfo_offsetGet, 0, 0, 1) |
|
|
|
|
PROTOBUF_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_offsetExists, 0, 0, _IS_BOOL, 0) |
|
|
|
|
ZEND_ARG_INFO(0, index) |
|
|
|
|
ZEND_END_ARG_INFO() |
|
|
|
|
|
|
|
|
|
ZEND_BEGIN_ARG_INFO_EX(arginfo_offsetSet, 0, 0, 2) |
|
|
|
|
ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_offsetGet, 0, 0, IS_MIXED, 1) |
|
|
|
|
ZEND_ARG_INFO(0, index) |
|
|
|
|
ZEND_END_ARG_INFO() |
|
|
|
|
|
|
|
|
|
PROTOBUF_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_offsetSet, 0, 2, IS_VOID, 0) |
|
|
|
|
ZEND_ARG_INFO(0, index) |
|
|
|
|
ZEND_ARG_INFO(0, newval) |
|
|
|
|
ZEND_END_ARG_INFO() |
|
|
|
|
|
|
|
|
|
PROTOBUF_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_offsetUnset, 0, 0, IS_VOID, 0) |
|
|
|
|
ZEND_ARG_INFO(0, index) |
|
|
|
|
ZEND_END_ARG_INFO() |
|
|
|
|
|
|
|
|
|
PROTOBUF_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_count, 0, 0, IS_LONG, 0) |
|
|
|
|
ZEND_END_ARG_INFO() |
|
|
|
|
|
|
|
|
|
ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_getIterator, 0, 0, Traversable, 0) |
|
|
|
|
ZEND_END_ARG_INFO() |
|
|
|
|
|
|
|
|
|
static zend_function_entry repeated_field_methods[] = { |
|
|
|
|
PHP_ME(RepeatedField, __construct, arginfo_construct, ZEND_ACC_PUBLIC) |
|
|
|
|
PHP_ME(RepeatedField, append, arginfo_append, ZEND_ACC_PUBLIC) |
|
|
|
|
PHP_ME(RepeatedField, offsetExists, arginfo_offsetGet, ZEND_ACC_PUBLIC) |
|
|
|
|
PHP_ME(RepeatedField, offsetGet, arginfo_offsetGet, ZEND_ACC_PUBLIC) |
|
|
|
|
PHP_ME(RepeatedField, offsetSet, arginfo_offsetSet, ZEND_ACC_PUBLIC) |
|
|
|
|
PHP_ME(RepeatedField, offsetUnset, arginfo_offsetGet, ZEND_ACC_PUBLIC) |
|
|
|
|
PHP_ME(RepeatedField, count, arginfo_void, ZEND_ACC_PUBLIC) |
|
|
|
|
PHP_ME(RepeatedField, getIterator, arginfo_void, ZEND_ACC_PUBLIC) |
|
|
|
|
PHP_ME(RepeatedField, __construct, arginfo_construct, ZEND_ACC_PUBLIC) |
|
|
|
|
PHP_ME(RepeatedField, append, arginfo_append, ZEND_ACC_PUBLIC) |
|
|
|
|
PHP_ME(RepeatedField, offsetExists, arginfo_offsetExists, ZEND_ACC_PUBLIC) |
|
|
|
|
PHP_ME(RepeatedField, offsetGet, arginfo_offsetGet, ZEND_ACC_PUBLIC) |
|
|
|
|
PHP_ME(RepeatedField, offsetSet, arginfo_offsetSet, ZEND_ACC_PUBLIC) |
|
|
|
|
PHP_ME(RepeatedField, offsetUnset, arginfo_offsetUnset, ZEND_ACC_PUBLIC) |
|
|
|
|
PHP_ME(RepeatedField, count, arginfo_count, ZEND_ACC_PUBLIC) |
|
|
|
|
PHP_ME(RepeatedField, getIterator, arginfo_getIterator, ZEND_ACC_PUBLIC) |
|
|
|
|
ZEND_FE_END |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
@ -550,7 +564,7 @@ static void RepeatedFieldIter_make(zval *val, zval *repeated_field) { |
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* RepeatedFieldIter::rewind() |
|
|
|
|
* RepeatedFieldIter::rewind(): void |
|
|
|
|
* |
|
|
|
|
* Implements the Iterator interface. Sets the iterator to the first element. |
|
|
|
|
*/ |
|
|
|
@ -560,7 +574,7 @@ PHP_METHOD(RepeatedFieldIter, rewind) { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* RepeatedFieldIter::current() |
|
|
|
|
* RepeatedFieldIter::current(): mixed |
|
|
|
|
* |
|
|
|
|
* Implements the Iterator interface. Returns the current value. |
|
|
|
|
*/ |
|
|
|
@ -583,7 +597,7 @@ PHP_METHOD(RepeatedFieldIter, current) { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* RepeatedFieldIter::key() |
|
|
|
|
* RepeatedFieldIter::key(): mixed |
|
|
|
|
* |
|
|
|
|
* Implements the Iterator interface. Returns the current key. |
|
|
|
|
*/ |
|
|
|
@ -593,7 +607,7 @@ PHP_METHOD(RepeatedFieldIter, key) { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* RepeatedFieldIter::next() |
|
|
|
|
* RepeatedFieldIter::next(): void |
|
|
|
|
* |
|
|
|
|
* Implements the Iterator interface. Advances to the next element. |
|
|
|
|
*/ |
|
|
|
@ -603,7 +617,7 @@ PHP_METHOD(RepeatedFieldIter, next) { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* RepeatedFieldIter::valid() |
|
|
|
|
* RepeatedFieldIter::valid(): bool |
|
|
|
|
* |
|
|
|
|
* Implements the Iterator interface. Returns true if this is a valid element. |
|
|
|
|
*/ |
|
|
|
@ -613,12 +627,27 @@ PHP_METHOD(RepeatedFieldIter, valid) { |
|
|
|
|
RETURN_BOOL(intern->position < upb_array_size(field->array)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_current, 0, 0, IS_MIXED, 0) |
|
|
|
|
ZEND_END_ARG_INFO() |
|
|
|
|
|
|
|
|
|
ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_key, 0, 0, IS_MIXED, 0) |
|
|
|
|
ZEND_END_ARG_INFO() |
|
|
|
|
|
|
|
|
|
PROTOBUF_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_next, 0, 0, IS_VOID, 0) |
|
|
|
|
ZEND_END_ARG_INFO() |
|
|
|
|
|
|
|
|
|
PROTOBUF_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_valid, 0, 0, _IS_BOOL, 0) |
|
|
|
|
ZEND_END_ARG_INFO() |
|
|
|
|
|
|
|
|
|
PROTOBUF_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_rewind, 0, 0, IS_VOID, 0) |
|
|
|
|
ZEND_END_ARG_INFO() |
|
|
|
|
|
|
|
|
|
static zend_function_entry repeated_field_iter_methods[] = { |
|
|
|
|
PHP_ME(RepeatedFieldIter, rewind, arginfo_void, ZEND_ACC_PUBLIC) |
|
|
|
|
PHP_ME(RepeatedFieldIter, current, arginfo_void, ZEND_ACC_PUBLIC) |
|
|
|
|
PHP_ME(RepeatedFieldIter, key, arginfo_void, ZEND_ACC_PUBLIC) |
|
|
|
|
PHP_ME(RepeatedFieldIter, next, arginfo_void, ZEND_ACC_PUBLIC) |
|
|
|
|
PHP_ME(RepeatedFieldIter, valid, arginfo_void, ZEND_ACC_PUBLIC) |
|
|
|
|
PHP_ME(RepeatedFieldIter, rewind, arginfo_rewind, ZEND_ACC_PUBLIC) |
|
|
|
|
PHP_ME(RepeatedFieldIter, current, arginfo_current, ZEND_ACC_PUBLIC) |
|
|
|
|
PHP_ME(RepeatedFieldIter, key, arginfo_key, ZEND_ACC_PUBLIC) |
|
|
|
|
PHP_ME(RepeatedFieldIter, next, arginfo_next, ZEND_ACC_PUBLIC) |
|
|
|
|
PHP_ME(RepeatedFieldIter, valid, arginfo_valid, ZEND_ACC_PUBLIC) |
|
|
|
|
ZEND_FE_END |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|