Open
Description
The AbstractDbMapper provided by ZfcBase, and by extension ZfcUser's UserMapper, duplicate a ton of work that can easily be handed off to ZF2's built-in TableGateway system.
- Building and executing SQL queries
- Hydrating result of select() calls
- Master/Slave adapter support
Utilizing TableGateway would strip ZfcUser's mapper down from ~400 lines (including AbstractDbMapper) to ~125 and remove the hard dependency on ZfcBase\Mapper\AbstractDbMapper
, leaving ZfcUser's mapper as a just a thin wrapper around TableGateway that provides convenience methods (findBy*) and extracts entities passed to insert/update/delete methods.
An initial prototype of the refactoring can be diffed here. The modifications build on the result of #554, so I will submit a PR for this changeset once that PR has been completed.
Metadata
Metadata
Assignees
Labels
No labels