| 1 | <?php |
||
| 10 | class MapperFactory implements CanCreateMapper |
||
| 11 | { |
||
| 12 | |||
| 13 | private $connection; |
||
| 14 | private $cache = []; |
||
| 15 | private $table; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * Creates new factory instance |
||
| 19 | * |
||
| 20 | * @param PDO $connection |
||
| 21 | * @param string $table A list of table name aliases |
||
| 22 | */ |
||
| 23 | 3 | public function __construct(PDO $connection, string $table) |
|
| 28 | |||
| 29 | |||
| 30 | /** |
||
| 31 | * Methode for retrieving an SQL data mapper instance |
||
| 32 | * |
||
| 33 | * @param string $className Fully qualified class name of the mapper |
||
| 34 | * |
||
| 35 | * @throws RuntimeException if mapper's class can't be found |
||
| 36 | * |
||
| 37 | * @return SqlMapper |
||
| 38 | */ |
||
| 39 | 3 | public function create(string $className) |
|
| 54 | |||
| 55 | } |
||
| 56 |