Currently I'm creating my Paginator objects in Mappers like this:
$sql = new Sql($this->dbAdapter);
$select = $sql->select('my_table');
$select->from(...)->columns(...)->join(...)->where(...)...;
$adapter = new MyPaginatorAdapter($select, $this->dbAdapter);
$paginator = new Paginator($adapter);
$paginator->setCurrentPageNumber($page);
That means, the class has multiple hard dependencies, that should be better injected. But how to do this, when the PaginatorAdapter needs a Select object on instantiating? It also has now setter for this.
(Why) Is it (by design?) not possible to create a Paginator in a Factory and add it as injected dependency?