PHP:
var subMenuCollection = new DictionaryCollection();
function DictionaryCollection() {
this.add = dictionaryAdd;
this.item = dictionaryItem;
this.remove = dictionaryRemove;
}
function dictionaryAdd(key, value) {
this[key] = value;
}
function dictionaryItem(key) {
return this[key];
}
function dictionaryRemove(key) {
this[key] = null;
}