1 <?php
2
3 /* --------------------------------------------------------------
4 StoredProduct.inc.php 2016-01-18
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 * Class StoredProduct
15 *
16 * @category System
17 * @package Product
18 * @subpackage Entities
19 */
20 class StoredProduct extends GXEngineProduct implements StoredProductInterface
21 {
22 /**
23 * Product ID.
24 *
25 * @var int
26 */
27 protected $productId = 0;
28
29
30 /**
31 * StoredProduct constructor.
32 *
33 * @param IdType $productId Product ID.
34 * @param ProductSettingsInterface $settings Product settings.
35 */
36 public function __construct(IdType $productId, ProductSettingsInterface $settings)
37 {
38 parent::__construct($settings);
39
40 $this->productId = $productId->asInt();
41 }
42
43
44 /**
45 * Get Product ID.
46 *
47 * Returns the ID of the stored product.
48 *
49 * @return int The product ID.
50 */
51 public function getProductId()
52 {
53 return $this->productId;
54 }
55
56
57 /**
58 * Returns the product ID.
59 *
60 * @return int
61 */
62 public function getAddonValueContainerId()
63 {
64 return $this->getProductId();
65 }
66 }