-
Notifications
You must be signed in to change notification settings - Fork 0
/
Product.php
61 lines (48 loc) · 1.3 KB
/
Product.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
namespace gazelleRunningSupplies;
public class Product
{
private int $productID;
private string $productName;
private string $productImagePath;
private float $price;
private int $stock;
function __construct(int $productID, string $productName, float $price, int $stock)
{
$this->productID = $productID;
$this->productName = $productName;
$this->price = $price;
$this->stock = $stock;
}
function addProductImagePath(string $image)
{
$this->productImagePath = $image;
}
function adjustPrice(float $amount)
{
$this->price = $amount;
}
function getID()
{
return $this->productID;
}
function getName()
{
return $this->productName;
}
function getImagePath()
{
return $this->productImagePath;
}
function getPrice()
{
return $this->price;
}
function getStock()
{
return $this->stock;
}
function getSpan()
{
echo '<span class="productSpan" ><img class="productImage" id="shoe1Image"/><span class="productDetails" id="shoe1Details"><p id="productName">Product Name</p><p id="productPrice">Product Price</p></span><button class="uiButton" id="addShoe1Basket">Add To Basket</button></span>';
}
}