Add 'assoc' param

When $assoc is true, returned objects will be converted into associative arrays.