change the scope of RepositoryFilter::getCollection() to public so you don't have to use an iterator_to_array() to fetch the resultset