public function getPaginator($criteria = [], array $fields = []) {
		$criteriaNormalized = $this->normalizeCriteria($criteria);
		
		$mongoCursor = $this->getAdapter()->find(
			$this->getTableName(),
			$criteriaNormalized,
			$fields
		);
		
		if ($criteria instanceof Criteria) {
			$this->applyCriteriaToCursor($criteria, $mongoCursor);
		}
		
		return new Paginator(new PaginatorAdapter($mongoCursor, $this));
	}
public function getPaginator($criteria = [], array $fields = []) {
		$criteriaNormalized = $this->normalizeCriteria($criteria);
		
		$mongoCursor = $this->getAdapter()->find(
			$this->getTableName(),
			$criteriaNormalized,
			$fields
		);
		
		if ($criteria instanceof Criteria) {
			$this->applyCriteriaToCursor($criteria, $mongoCursor);
		}
		
		return new Paginator(new PaginatorAdapter($mongoCursor, $this));
	}
public function getPaginator ( $ criteria = [ ] , array $ fields = [ ] ) { $ criteriaNormalized = $ this -> normalizeCriteria ( $ criteria ) ; $ mongoCursor = $ this -> getAdapter ( ) -> find ( $ this -> getTableName ( ) , $ criteriaNormalized , $ fields ) ; if ( $ criteria instanceof Criteria ) { $ this -> applyCriteriaToCursor ( $ criteria , $ mongoCursor ) ; } return new Paginator ( new PaginatorAdapter ( $ mongoCursor , $ this ) ) ; }
Fetch an items from a database and return as paginator

@param  mixed $criteria Query criteria
@param  array $fields   Selected fields
@return Paginator
Fetch an items from a database and return as paginator