Collections updates
Replace "collection" with "collections" in various file names since we typically use the plural form in conversation and documentation. Add set() and removeAt() methods needed for collection interfaces. Also add the KeyedIterable and KeyedIterator interfaces. Add __construct() methods for collections
Esse commit está contido em:
@@ -19,7 +19,7 @@
|
||||
#include <runtime/base/array/hphp_array.h>
|
||||
#include <runtime/base/complex_types.h>
|
||||
#include <runtime/base/object_data.h>
|
||||
#include <runtime/ext/ext_collection.h>
|
||||
#include <runtime/ext/ext_collections.h>
|
||||
|
||||
namespace HPHP {
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
@@ -76,24 +76,6 @@ void ArrayIter::reset() {
|
||||
decRefObj(obj);
|
||||
}
|
||||
|
||||
void ArrayIter::begin(CVarRef map, CStrRef context) {
|
||||
try {
|
||||
new (this) ArrayIter(map.begin(context));
|
||||
} catch (...) {
|
||||
m_data = nullptr;
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
void ArrayIter::begin(CArrRef map, CStrRef context) {
|
||||
try {
|
||||
new (this) ArrayIter(map.get());
|
||||
} catch (...) {
|
||||
m_data = nullptr;
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
template <bool incRef>
|
||||
void ArrayIter::objInit(ObjectData *obj) {
|
||||
assert(obj);
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário