This mechanism may be more succinctly expressed with a closure (instead of 4 methods) when PHP5.3 is assumed, though is pretty clear to read.