package { import flash.events.Event; import flash.events.EventDispatcher; public class BaseRegistry implements IRegistry { protected var stage:Object; protected var head:Object; protected var lastUpdated:Array; public function BaseRegistry() { this.stage = {}; this.head = {}; this.lastUpdated = new Array(); } public function add(obj:Object):void { this.stage = Util.extend(this.stage, obj); } public function commit():void { if(!Util.objectIsEmpty(this.stage)) { this.head = Util.extend(this.head, this.stage); this.lastUpdated = Util.toPropertyChains(this.stage); this.stage = {}; } } public function get(propChain:String):* { return Util.resolvePropertyChain(propChain, this.head); } public function getLastUpdated():Array { return this.lastUpdated; } } }