1 | <?php |
||
15 | class CatalogService extends BaseService implements ListableService |
||
16 | { |
||
17 | use IdentifiableList, PaginableList; |
||
18 | |||
19 | /** |
||
20 | * @var Catalog[] |
||
21 | */ |
||
22 | protected $entities = []; |
||
23 | |||
24 | /** |
||
25 | * @param Catalog $catalog |
||
26 | */ |
||
27 | 5 | public function add(EntityInterface $catalog) |
|
28 | { |
||
29 | 5 | if ($catalog instanceof Catalog) { |
|
30 | 5 | $this->entities[] = $catalog; |
|
31 | 5 | } |
|
32 | 5 | } |
|
33 | |||
34 | /** |
||
35 | * @param $link |
||
36 | * |
||
37 | * @return string |
||
38 | */ |
||
39 | 2 | protected function composeListLink($link) |
|
48 | |||
49 | /** |
||
50 | * @deprecated |
||
51 | * |
||
52 | * @param int|null |
||
53 | * |
||
54 | * @return array|bool |
||
55 | */ |
||
56 | 1 | public function lists($id = null) |
|
57 | { |
||
58 | 1 | if ($id !== null) { |
|
59 | $this->setId($id); |
||
60 | } |
||
61 | |||
62 | 1 | return $this->getList(); |
|
63 | } |
||
64 | |||
65 | /** |
||
66 | * @param $array |
||
67 | * |
||
68 | * @return Catalog |
||
69 | */ |
||
70 | 5 | public function parseArrayToEntity($array) |
|
77 | |||
78 | /** |
||
79 | * @return string |
||
80 | */ |
||
81 | 5 | protected function getLink() |
|
85 | |||
86 | } |