1 <?php
2
3 /* --------------------------------------------------------------
4 ProductAttributeRepositoryWriterInterface.inc.php 2016-01-07
5 Gambio GmbH
6 http://www.gambio.de
7 Copyright (c) 2015 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 ProductAttributeRepositoryWriterInterface
15 *
16 * @category System
17 * @package ProductModule
18 * @subpackage Interface
19 */
20 interface ProductAttributeRepositoryWriterInterface
21 {
22 /**
23 * Adds a product attribute entity to a product by the given product id.
24 *
25 * @param IdType $productId Id of product entity which should belongs to the added
26 * attributes.
27 * @param ProductAttributeInterface $productAttribute Product attribute entity to add to the product.
28 *
29 * @return int Id of the stored product attribute.
30 */
31 public function insertIntoProduct(IdType $productId, ProductAttributeInterface $productAttribute);
32
33
34 /**
35 * Updates a product attribute entity.
36 *
37 * @param StoredProductAttributeInterface $productAttribute Product attribute entity to update.
38 *
39 * @return ProductAttributeRepositoryWriterInterface|$this Same instance for chained method calls.
40 */
41 public function update(StoredProductAttributeInterface $productAttribute);
42 }