1 | <?php |
||
36 | abstract class AbstractFinderRepository extends AbstractRepository implements FinderAwareRepositoryInterface |
||
37 | { |
||
38 | |||
39 | /** |
||
40 | * The finder factory. |
||
41 | * |
||
42 | * @var \TechDivision\Import\Repositories\Finders\FinderFactoryInterface |
||
43 | */ |
||
44 | protected $finderFactory; |
||
45 | |||
46 | /** |
||
47 | * The array with the initialized finders. |
||
48 | * |
||
49 | * @var array |
||
50 | */ |
||
51 | protected $finders = array(); |
||
52 | |||
53 | /** |
||
54 | * Initialize the repository with the passed connection and utility class name. |
||
55 | * . |
||
56 | * @param \TechDivision\Import\Connection\ConnectionInterface $connection The connection instance |
||
57 | * @param \TechDivision\Import\Repositories\SqlStatementRepositoryInterface $sqlStatementRepository The SQL repository instance |
||
58 | * @param \TechDivision\Import\Repositories\Finders\FinderFactoryInterface $finderFactory The finder factory instance |
||
59 | */ |
||
60 | public function __construct( |
||
72 | |||
73 | /** |
||
74 | * Add the initialize finder to the repository. |
||
75 | * |
||
76 | * @param \TechDivision\Import\Repositories\Finders\FinderInterface $finder The finder instance to add |
||
77 | * |
||
78 | * @return void |
||
79 | */ |
||
80 | public function addFinder(FinderInterface $finder) |
||
84 | |||
85 | /** |
||
86 | * Return's the finder instance with the passed key. |
||
87 | * |
||
88 | * @param string $key The key of the finder to return |
||
89 | * |
||
90 | * @return \TechDivision\Import\Repositories\Finders\FinderInterface The finder instance |
||
91 | * @throws \InvalidArgumentException Is thrown if the finder with the passed key is not available |
||
92 | */ |
||
93 | public function getFinder($key) |
||
104 | } |
||
105 |