1 <?php
2
3 /* --------------------------------------------------------------
4 CategoryRepositoryReaderInterface.php 2016-01-29
5 Gambio GmbH
6 http://www.gambio.de
7 Copyright (c) 2016 Gambio GmbH
8 Released under the GNU General Public License (Version 2)
9 [http://www.gnu.org/licenses/gpl-2.0.html]
10 --------------------------------------------------------------
11 */
12
13 /**
14 * Interface CategoryRepositoryReaderInterface
15 *
16 * This interface defines methods for fetching category records from the database and is used in the category
17 * repository among the classes for writing and deleting category records.
18 *
19 * @category System
20 * @package Category
21 * @subpackage Interfaces
22 */
23 interface CategoryRepositoryReaderInterface
24 {
25 /**
26 * Returns a category by the given ID.
27 *
28 * @param IdType $categoryId Category ID.
29 *
30 * @return StoredCategoryInterface
31 */
32 public function getById(IdType $categoryId);
33
34
35 /**
36 * Returns all Categories with the provided parent ID.
37 *
38 * @param IdType $parentId
39 *
40 * @return IdCollection
41 */
42 public function getByParentId(IdType $parentId);
43 }