1: <?php
2:
3:
4: namespace BeerXML\Record;
5:
6:
7: use BeerXML\Generator\IMashProfileDisplay as MashProfileGetter;
8: use BeerXML\Parser\IMashProfileDisplay as MashProfileSetter;
9:
10: class MashProfile implements MashProfileGetter, MashProfileSetter
11: {
12: /**
13: * Name of the mash profile.
14: *
15: * @var string
16: */
17: private $name;
18:
19: /**
20: * Version of the mash record. Should always be "1" for this version of the XML standard.
21: *
22: * @var int
23: */
24: private $version = 1;
25:
26: /**
27: * The temperature of the grain before adding it to the mash in degrees Celsius.
28: *
29: * @var number
30: */
31: private $grainTemp;
32:
33: /**
34: * Record set that starts the list of <MASH_STEP> records. All MASH_STEP records should appear between the
35: * <MASH_STEPS> … </MASH_STEPS> pair.
36: *
37: * @var array
38: */
39: private $mashSteps = array();
40:
41: /**
42: * Notes associated with this profile – may be multiline.
43: *
44: * @var string
45: */
46: private $notes;
47:
48: /**
49: * Grain tun temperature – may be used to adjust the infusion temperature for equipment if the program supports it.
50: * Measured in degrees C.
51: *
52: * @var number
53: */
54: private $tunTemp;
55:
56: /**
57: * Temperature of the sparge water used in degrees Celsius.
58: *
59: * @var number
60: */
61: private $spargeTemp;
62:
63: /**
64: * PH of the sparge.
65: *
66: * @var float
67: */
68: private $pH;
69:
70: /**
71: * Weight of the mash tun in kilograms
72: *
73: * @var float
74: */
75: private $tunWeight;
76:
77: /**
78: * Specific heat of the tun material in calories per gram-degree C.
79: *
80: * @var float
81: */
82: private $tunSpecificHeat;
83:
84: /**
85: * If TRUE, mash infusion and decoction calculations should take into account the temperature effects of the
86: * equipment (tun specific heat and tun weight). If FALSE, the tun is assumed to be pre-heated. Default is FALSE.
87: *
88: * @var bool
89: */
90: private $equipAdjust = false;
91:
92: /** Fields from Appendix A Optional Extensions for BeerXML Display **/
93:
94: /**
95: * @var string
96: */
97: private $displayGrainTemp;
98:
99: /**
100: * @var string
101: */
102: private $displayTunTemp;
103:
104: /**
105: * @var string
106: */
107: private $displaySpargeTemp;
108:
109: /**
110: * @var string
111: */
112: private $displayTunWeight;
113:
114: /**
115: * @param boolean $equipAdjust
116: */
117: public function setEquipAdjust($equipAdjust)
118: {
119: $this->equipAdjust = $equipAdjust;
120: }
121:
122: /**
123: * @return boolean
124: */
125: public function getEquipAdjust()
126: {
127: return $this->equipAdjust;
128: }
129:
130: /**
131: * @param number $grainTemp
132: */
133: public function setGrainTemp($grainTemp)
134: {
135: $this->grainTemp = $grainTemp;
136: }
137:
138: /**
139: * @return number
140: */
141: public function getGrainTemp()
142: {
143: return $this->grainTemp;
144: }
145:
146: /**
147: * @param MashStep $mashStep
148: */
149: public function addMashStep($mashStep)
150: {
151: $this->mashSteps[] = $mashStep;
152: }
153:
154: /**
155: * @return MashStep[]
156: */
157: public function getMashSteps()
158: {
159: return $this->mashSteps;
160: }
161:
162: /**
163: * @param string $name
164: */
165: public function setName($name)
166: {
167: $this->name = $name;
168: }
169:
170: /**
171: * @return string
172: */
173: public function getName()
174: {
175: return $this->name;
176: }
177:
178: /**
179: * @param string $notes
180: */
181: public function setNotes($notes)
182: {
183: $this->notes = $notes;
184: }
185:
186: /**
187: * @return string
188: */
189: public function getNotes()
190: {
191: return $this->notes;
192: }
193:
194: /**
195: * @param float $pH
196: */
197: public function setPH($pH)
198: {
199: $this->pH = $pH;
200: }
201:
202: /**
203: * @return float
204: */
205: public function getPH()
206: {
207: return $this->pH;
208: }
209:
210: /**
211: * @param number $spargeTemp
212: */
213: public function setSpargeTemp($spargeTemp)
214: {
215: $this->spargeTemp = $spargeTemp;
216: }
217:
218: /**
219: * @return number
220: */
221: public function getSpargeTemp()
222: {
223: return $this->spargeTemp;
224: }
225:
226: /**
227: * @param float $tunSpecificHeat
228: */
229: public function setTunSpecificHeat($tunSpecificHeat)
230: {
231: $this->tunSpecificHeat = $tunSpecificHeat;
232: }
233:
234: /**
235: * @return float
236: */
237: public function getTunSpecificHeat()
238: {
239: return $this->tunSpecificHeat;
240: }
241:
242: /**
243: * @param number $tunTemp
244: */
245: public function setTunTemp($tunTemp)
246: {
247: $this->tunTemp = $tunTemp;
248: }
249:
250: /**
251: * @return number
252: */
253: public function getTunTemp()
254: {
255: return $this->tunTemp;
256: }
257:
258: /**
259: * @param float $tunWeight
260: */
261: public function setTunWeight($tunWeight)
262: {
263: $this->tunWeight = $tunWeight;
264: }
265:
266: /**
267: * @return float
268: */
269: public function getTunWeight()
270: {
271: return $this->tunWeight;
272: }
273:
274: /**
275: * @param int $version
276: */
277: public function setVersion($version)
278: {
279: $this->version = $version;
280: }
281:
282: /**
283: * @return int
284: */
285: public function getVersion()
286: {
287: return $this->version;
288: }
289:
290: /**
291: * Grain temperature in user display units with the units. For example: "72 F".
292: *
293: * @param string $displayGrainTemp
294: */
295: public function setDisplayGrainTemp($displayGrainTemp)
296: {
297: $this->displayGrainTemp = $displayGrainTemp;
298: }
299:
300: /**
301: * Grain temperature in user display units with the units. For example: "72 F".
302: *
303: * @return string
304: */
305: public function getDisplayGrainTemp()
306: {
307: return $this->displayGrainTemp;
308: }
309:
310: /**
311: * Sparge temperature in user defined units. For example "178 F"
312: *
313: * @param string $displaySpargeTemp
314: */
315: public function setDisplaySpargeTemp($displaySpargeTemp)
316: {
317: $this->displaySpargeTemp = $displaySpargeTemp;
318: }
319:
320: /**
321: * Sparge temperature in user defined units. For example "178 F"
322: *
323: * @return string
324: */
325: public function getDisplaySpargeTemp()
326: {
327: return $this->displaySpargeTemp;
328: }
329:
330: /**
331: * Tun temperature in user display units. For example "68 F"
332: *
333: * @param string $displayTunTemp
334: */
335: public function setDisplayTunTemp($displayTunTemp)
336: {
337: $this->displayTunTemp = $displayTunTemp;
338: }
339:
340: /**
341: * Tun temperature in user display units. For example "68 F"
342: *
343: * @return string
344: */
345: public function getDisplayTunTemp()
346: {
347: return $this->displayTunTemp;
348: }
349:
350: /**
351: * Tun weight in user defined units – for example "10 lb"
352: *
353: * @param string $displayTunWeight
354: */
355: public function setDisplayTunWeight($displayTunWeight)
356: {
357: $this->displayTunWeight = $displayTunWeight;
358: }
359:
360: /**
361: * Tun weight in user defined units – for example "10 lb"
362: *
363: * @return string
364: */
365: public function getDisplayTunWeight()
366: {
367: return $this->displayTunWeight;
368: }
369:
370:
371: }