Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
calculationresult.php
1<?php
3
5
12{
13 const PERIOD_TYPE_MIN = "MIN";
14 const PERIOD_TYPE_HOUR = "H";
15 const PERIOD_TYPE_DAY = "D";
16 const PERIOD_TYPE_MONTH = "M";
17
19 protected $description = "";
21 protected $periodDescription = "";
23 protected $periodFrom = null;
25 protected $periodTo = null;
29 protected $nextStep = false;
31 protected $packsCount = 0;
33 protected $extraServicesPrice = 0;
35 protected $deliveryPrice = 0;
37 protected $tmpData = "";
38
42 public function __construct() { parent::__construct(); }
43
45 public function getDeliveryPrice() { return $this->deliveryPrice; }
46
48 public function setDeliveryPrice($price) { $this->deliveryPrice = $price; }
49
52
54 public function setExtraServicesPrice($price) { $this->extraServicesPrice = $price; }
55
57 public function getPrice() { return $this->deliveryPrice + $this->extraServicesPrice; }
58
60 public function setDescription($description) { $this->description = $description; }
61
63 public function getDescription() { return $this->description; }
64
66 public function setPeriodDescription($description) { $this->periodDescription = $description; }
67
69 public function getPeriodDescription() { return $this->periodDescription; }
70
74 public function setAsNextStep() { $this->nextStep = true; }
75
77 public function isNextStep() { return $this->nextStep; }
78
80 public function getPacksCount() { return $this->packsCount; }
81
83 public function setPacksCount($count) { $this->packsCount = $count; }
84
86 public function getTmpData() { return $this->tmpData; }
87
89 public function setTmpData($data) { $this->tmpData = $data; }
90
92 public function getPeriodFrom() { return $this->periodFrom; }
93
95 public function setPeriodFrom($periodFrom) { $this->periodFrom = intval($periodFrom); }
96
98 public function getPeriodTo() { return $this->periodTo; }
99
101 public function setPeriodTo($periodTo) { $this->periodTo = intval($periodTo); }
102
104 public function getPeriodType() { return $this->periodType; }
105
107 public function setPeriodType($periodType)
108 {
109 if(in_array($periodType, array(self::PERIOD_TYPE_DAY, self::PERIOD_TYPE_HOUR, self::PERIOD_TYPE_MIN, self::PERIOD_TYPE_MONTH)))
110 $this->periodType = $periodType;
111 }
112}