The sorting is performed on the array of raw data. And the pagination is performed by slicing the array of the sorted raw data. We can not give the optimized raw data to it by processing the sorting and pagination by ourselves … which we can easily do with CActiveDataProvider or CSqlDataProvider where the sorting is converted to ‘ORDER’ and the pagination to ‘OFFSET’ and ‘LIMIT’.
I would rather want to make a custom data provider derived from CArrayDataProvider (or CDataProvider) which performs the pagination by utilizing the yelp api.