using static instead of get_called_class
Added wraper for array of resources, for json serialization as an array of objects.