Making it generic to use either arrays or objects

Making it more generic using SPL class ArrayObject, since the request parameters could either be a hashmap or a object when it is sent from the client. This is not related the specs though, just a convenience for people using php which has both hashmap & objects.