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:
andrewparoski
2013-03-04 13:34:50 -08:00
commit de Sara Golemon
commit cc858b73db
33 arquivos alterados com 1373 adições e 718 exclusões
+1 -19
Ver Arquivo
@@ -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);