protected function applyCriteriaToCursor(Criteria $criteria, MongoCursor $mongoCursor) {
		$sort   = $criteria->getSortConditions();
		$offset = $criteria->getOffset();
		$limit  = $criteria->getLimit();
				
		if (! empty($sort)) {
			$mongoCursor->sort($sort);
		}
		
		if ($offset !== null) {
			$mongoCursor->skip($offset);
		}

		if ($limit !== null) {
			$mongoCursor->limit($limit);
		}
	}
protected function applyCriteriaToCursor(Criteria $criteria, MongoCursor $mongoCursor) {
		$sort   = $criteria->getSortConditions();
		$offset = $criteria->getOffset();
		$limit  = $criteria->getLimit();
				
		if (! empty($sort)) {
			$mongoCursor->sort($sort);
		}
		
		if ($offset !== null) {
			$mongoCursor->skip($offset);
		}

		if ($limit !== null) {
			$mongoCursor->limit($limit);
		}
	}
protected function applyCriteriaToCursor ( Criteria $ criteria , MongoCursor $ mongoCursor ) { $ sort = $ criteria -> getSortConditions ( ) ; $ offset = $ criteria -> getOffset ( ) ; $ limit = $ criteria -> getLimit ( ) ; if ( ! empty ( $ sort ) ) { $ mongoCursor -> sort ( $ sort ) ; } if ( $ offset !== null ) { $ mongoCursor -> skip ( $ offset ) ; } if ( $ limit !== null ) { $ mongoCursor -> limit ( $ limit ) ; } }
Apply critera to Mongo cursor

@param MongoCriteria $criteria
@param MongoCursor   $mongoCursor
Apply critera to Mongo cursor