1 | <?php |
||
12 | class CatalogUrlPathResolver |
||
13 | { |
||
14 | /** |
||
15 | * @var CategoryResolverInterface |
||
16 | */ |
||
17 | private $categoryResolver; |
||
18 | |||
19 | /** |
||
20 | * @var ProductResolverInterface |
||
21 | */ |
||
22 | private $productResolver; |
||
23 | |||
24 | /** |
||
25 | * @var StoreManagerInterface |
||
26 | */ |
||
27 | private $storeManager; |
||
28 | |||
29 | /** |
||
30 | * @param CategoryResolverInterface $categoryResolver |
||
31 | * @param ProductResolverInterface $productResolver |
||
32 | * @param StoreManagerInterface $storeManager |
||
33 | */ |
||
34 | public function __construct( |
||
43 | |||
44 | /** |
||
45 | * @param UrlPath $urlPath |
||
46 | * @param int $storeId |
||
47 | * |
||
48 | * @return EntityData |
||
49 | */ |
||
50 | public function resolve(UrlPath $urlPath, int $storeId) : EntityData |
||
62 | |||
63 | /** |
||
64 | * @param UrlPath $urlPath |
||
65 | * @param int $storeId |
||
66 | * |
||
67 | * @return int |
||
68 | */ |
||
69 | public function resolveParentCategoryId(UrlPath $urlPath, int $storeId) : int |
||
79 | |||
80 | /** |
||
81 | * @param string $urlKey |
||
82 | * @param int $storeId |
||
83 | * @param int $parentCategoryId |
||
84 | * |
||
85 | * @return EntityData |
||
86 | */ |
||
87 | private function resolveCategory(string $urlKey, int $storeId, int $parentCategoryId) : EntityData |
||
91 | |||
92 | /** |
||
93 | * @param string $urlKey |
||
94 | * @param int $storeId |
||
95 | * @param int $categoryId |
||
96 | * |
||
97 | * @return EntityData |
||
98 | */ |
||
99 | private function resolveProductInCategory(string $urlKey, int $storeId, int $categoryId) : EntityData |
||
111 | } |
||
112 |