1 | <?php |
||
36 | class ProductWebsiteRepository extends AbstractRepository implements ProductWebsiteRepositoryInterface |
||
37 | { |
||
38 | |||
39 | /** |
||
40 | * The prepared statement to load the existing product website relations. |
||
41 | * |
||
42 | * @var \PDOStatement |
||
43 | */ |
||
44 | protected $productWebsiteStmt; |
||
45 | |||
46 | /** |
||
47 | * The prepared statement to load the existing product website relations for the given SKU. |
||
48 | * |
||
49 | * @var \PDOStatement |
||
50 | */ |
||
51 | protected $productWebsitesBySkuStmt; |
||
52 | |||
53 | /** |
||
54 | * Initializes the repository's prepared statements. |
||
55 | * |
||
56 | * @return void |
||
57 | */ |
||
58 | public function init() |
||
67 | |||
68 | /** |
||
69 | * Load's and return's the product website relations for the product with the passed SKU. |
||
70 | * |
||
71 | * @param string $sku The SKU to of the product to load the product website relations for |
||
72 | * |
||
73 | * @return array The product website relations |
||
74 | */ |
||
75 | public function findAllBySku($sku) |
||
85 | |||
86 | /** |
||
87 | * Load's and return's the product website relation with the passed product and website ID. |
||
88 | * |
||
89 | * @param string $productId The product ID of the relation |
||
90 | * @param string $websiteId The website ID of the relation |
||
91 | * |
||
92 | * @return array The product website |
||
93 | */ |
||
94 | public function findOneByProductIdAndWebsite($productId, $websiteId) |
||
107 | } |
||
108 |