mapReduce() public method
Performs aggregation using MongoDB "map-reduce" mechanism. Note: this function will not return the aggregation result, instead it will write it inside the another Mongo collection specified by "out" parameter. For example: $customerCollection = Yii::$app->mongo->getCollection('customer');
$resultCollectionName = $customerCollection->mapReduce(
'function () {emit(this.status, this.amount)}',
'function (key, values) {return Array.sum(values)}',
'