I'm going to recommend a small change here- rather than rely on the user supplied key you should use the "item->getKey()" function to populate this. Otherwise I can see issues when people are using arrays for keys (which is perfectly valid for the existing API), as arrays can't be keys for other arrays. This will give it some good normalization.