1: <?php
2:
3:
4: namespace BeerXML\Record;
5:
6:
7: use BeerXML\Generator\IMashStepDisplay as MashStepGetter;
8: use BeerXML\Parser\IMashStepDisplay as MashStepSetter;
9:
10: class MashStep implements MashStepGetter, MashStepSetter
11: {
12:
13: const TYPE_INFUSION = 'Infusion';
14: const TYPE_TEMPERATURE = 'Temperature';
15: const TYPE_DECOCTION = 'Decoction';
16:
17: /**
18: * Name of the mash step – usually descriptive text such as "Dough In" or "Conversion"
19: *
20: * @var string
21: */
22: private $name;
23:
24: /**
25: * Version of the mash step record. Should always be "1" for this version of the XML standard.
26: *
27: * @var int
28: */
29: private $version = 1;
30:
31: /**
32: * May be "Infusion", "Temperature" or "Decoction" depending on the type of step. Infusion denotes adding hot water,
33: * Temperature denotes heating with an outside heat source, and decoction denotes drawing off some mash for boiling.
34: *
35: * @var string
36: */
37: private $type;
38:
39: /**
40: * The volume of water in liters to infuse in this step. Required only for infusion steps, though one may also add
41: * water for temperature mash steps. One should not have an infusion amount for decoction steps.
42: *
43: * @var number
44: */
45: private $infuseAmount;
46:
47: /**
48: * The target temperature for this step in degrees Celsius.
49: *
50: * @var number
51: */
52: private $stepTemp;
53:
54: /**
55: * The number of minutes to spend at this step – i.e. the amount of time we are to hold this particular step
56: * temperature.
57: *
58: * @var number
59: */
60: private $stepTime;
61:
62: /**
63: * Time in minutes to achieve the desired step temperature – useful particularly for temperature mashes where it may
64: * take some time to achieve the step temperature.
65: *
66: * @var number
67: */
68: private $rampTime;
69:
70: /**
71: * the temperature you can expect the mash to fall to after a long mash step. Measured in degrees Celsius.
72: *
73: * @var number
74: */
75: private $endTemp;
76:
77: /** Fields from Appendix A Optional Extensions for BeerXML Display **/
78:
79: /**
80: * @var string
81: */
82: private $description;
83:
84: /**
85: * @var string
86: */
87: private $waterGrainRatio;
88:
89: /**
90: * @var string
91: */
92: private $decoctionAmt;
93:
94: /**
95: * @var string
96: */
97: private $infuseTemp;
98:
99: /**
100: * @var string
101: */
102: private $displayStepTemp;
103:
104: /**
105: * @var string
106: */
107: private $displayInfuseAmt;
108:
109: /**
110: * the temperature you can expect the mash to fall to after a long mash step. Measured in degrees Celsius.
111: *
112: * @param number $endTemp
113: */
114: public function setEndTemp($endTemp)
115: {
116: $this->endTemp = $endTemp;
117: }
118:
119: /**
120: * the temperature you can expect the mash to fall to after a long mash step. Measured in degrees Celsius.
121: *
122: * @return number
123: */
124: public function getEndTemp()
125: {
126: return $this->endTemp;
127: }
128:
129: /**
130: * The volume of water in liters to infuse in this step. Required only for infusion steps, though one may also add
131: * water for temperature mash steps. One should not have an infusion amount for decoction steps.
132: *
133: * @param number $infuseAmount
134: */
135: public function setInfuseAmount($infuseAmount)
136: {
137: $this->infuseAmount = $infuseAmount;
138: }
139:
140: /**
141: * The volume of water in liters to infuse in this step. Required only for infusion steps, though one may also add
142: * water for temperature mash steps. One should not have an infusion amount for decoction steps.
143: *
144: * @return number
145: */
146: public function getInfuseAmount()
147: {
148: return $this->infuseAmount;
149: }
150:
151: /**
152: * Name of the mash step – usually descriptive text such as "Dough In" or "Conversion"
153: *
154: * @param string $name
155: */
156: public function setName($name)
157: {
158: $this->name = $name;
159: }
160:
161: /**
162: * Name of the mash step – usually descriptive text such as "Dough In" or "Conversion"
163: *
164: * @return string
165: */
166: public function getName()
167: {
168: return $this->name;
169: }
170:
171: /**
172: * Time in minutes to achieve the desired step temperature – useful particularly for temperature mashes where it may
173: * take some time to achieve the step temperature.
174: *
175: * @param number $rampTime
176: */
177: public function setRampTime($rampTime)
178: {
179: $this->rampTime = $rampTime;
180: }
181:
182: /**
183: * Time in minutes to achieve the desired step temperature – useful particularly for temperature mashes where it may
184: * take some time to achieve the step temperature.
185: *
186: * @return number
187: */
188: public function getRampTime()
189: {
190: return $this->rampTime;
191: }
192:
193: /**
194: * The target temperature for this step in degrees Celsius.
195: *
196: * @param number $stepTemp
197: */
198: public function setStepTemp($stepTemp)
199: {
200: $this->stepTemp = $stepTemp;
201: }
202:
203: /**
204: * The target temperature for this step in degrees Celsius.
205: *
206: * @return number
207: */
208: public function getStepTemp()
209: {
210: return $this->stepTemp;
211: }
212:
213: /**
214: * The number of minutes to spend at this step – i.e. the amount of time we are to hold this particular step
215: * temperature.
216: *
217: * @param number $stepTime
218: */
219: public function setStepTime($stepTime)
220: {
221: $this->stepTime = $stepTime;
222: }
223:
224: /**
225: * The number of minutes to spend at this step – i.e. the amount of time we are to hold this particular step
226: * temperature.
227: *
228: * @return number
229: */
230: public function getStepTime()
231: {
232: return $this->stepTime;
233: }
234:
235: /**
236: * May be "Infusion", "Temperature" or "Decoction" depending on the type of step. Infusion denotes adding hot water,
237: * Temperature denotes heating with an outside heat source, and decoction denotes drawing off some mash for boiling.
238: *
239: * @param string $type
240: */
241: public function setType($type)
242: {
243: $this->type = $type;
244: }
245:
246: /**
247: * May be "Infusion", "Temperature" or "Decoction" depending on the type of step. Infusion denotes adding hot water,
248: * Temperature denotes heating with an outside heat source, and decoction denotes drawing off some mash for boiling.
249: *
250: * @return string
251: */
252: public function getType()
253: {
254: return $this->type;
255: }
256:
257: /**
258: * Version of the mash step record. Should always be "1" for this version of the XML standard.
259: *
260: * @param int $version
261: */
262: public function setVersion($version)
263: {
264: $this->version = $version;
265: }
266:
267: /**
268: * Version of the mash step record. Should always be "1" for this version of the XML standard.
269: *
270: * @return int
271: */
272: public function getVersion()
273: {
274: return $this->version;
275: }
276:
277: /**
278: * Calculated volume of mash to decoct. Only applicable for a decoction step. Includes the units as in "7.5 l" or
279: * "2.3 gal"
280: *
281: * @param string $decoctionAmt
282: */
283: public function setDecoctionAmt($decoctionAmt)
284: {
285: $this->decoctionAmt = $decoctionAmt;
286: }
287:
288: /**
289: * Calculated volume of mash to decoct. Only applicable for a decoction step. Includes the units as in "7.5 l" or
290: * "2.3 gal"
291: *
292: * @return string
293: */
294: public function getDecoctionAmt()
295: {
296: return $this->decoctionAmt;
297: }
298:
299: /**
300: * Textual description of this step such as "Infuse 4.5 gal of water at 170 F" – may be either generated by the
301: * program or input by the user.
302: *
303: * @param string $description
304: */
305: public function setDescription($description)
306: {
307: $this->description = $description;
308: }
309:
310: /**
311: * Textual description of this step such as "Infuse 4.5 gal of water at 170 F" – may be either generated by the
312: * program or input by the user.
313: *
314: * @return string
315: */
316: public function getDescription()
317: {
318: return $this->description;
319: }
320:
321: /**
322: * Infusion amount along with the volume units as in "20 l" or "13 qt"
323: *
324: * @param string $displayInfuseAmt
325: */
326: public function setDisplayInfuseAmt($displayInfuseAmt)
327: {
328: $this->displayInfuseAmt = $displayInfuseAmt;
329: }
330:
331: /**
332: * Infusion amount along with the volume units as in "20 l" or "13 qt"
333: *
334: * @return string
335: */
336: public function getDisplayInfuseAmt()
337: {
338: return $this->displayInfuseAmt;
339: }
340:
341: /**
342: * Step temperature in user defined temperature units. For example "154F" or "68 C"
343: *
344: * @param string $displayStepTemp
345: */
346: public function setDisplayStepTemp($displayStepTemp)
347: {
348: $this->displayStepTemp = $displayStepTemp;
349: }
350:
351: /**
352: * Step temperature in user defined temperature units. For example "154F" or "68 C"
353: *
354: * @return string
355: */
356: public function getDisplayStepTemp()
357: {
358: return $this->displayStepTemp;
359: }
360:
361: /**
362: * The calculated infusion temperature based on the current step, grain, and other settings. Applicable only for an
363: * infusion step. Includes the units as in "154 F" or "68 C"
364: *
365: * @param string $infuseTemp
366: */
367: public function setInfuseTemp($infuseTemp)
368: {
369: $this->infuseTemp = $infuseTemp;
370: }
371:
372: /**
373: * The calculated infusion temperature based on the current step, grain, and other settings. Applicable only for an
374: * infusion step. Includes the units as in "154 F" or "68 C"
375: *
376: * @return string
377: */
378: public function getInfuseTemp()
379: {
380: return $this->infuseTemp;
381: }
382:
383: /**
384: * The total ratio of water to grain for this step AFTER the infusion along with the units, usually expressed in
385: * qt/lb or l/kg.
386: *
387: * Note this value must be consistent with the required infusion amount and amounts added in earlier steps and is
388: * only relevant as part of a <MASH> profile. For example "1.5 qt/lb" or "3.0 l/kg"
389: *
390: * @param string $waterGrainRatio
391: */
392: public function setWaterGrainRatio($waterGrainRatio)
393: {
394: $this->waterGrainRatio = $waterGrainRatio;
395: }
396:
397: /**
398: * The total ratio of water to grain for this step AFTER the infusion along with the units, usually expressed in
399: * qt/lb or l/kg.
400: *
401: * Note this value must be consistent with the required infusion amount and amounts added in earlier steps and is
402: * only relevant as part of a <MASH> profile. For example "1.5 qt/lb" or "3.0 l/kg"
403: * @return string
404: */
405: public function getWaterGrainRatio()
406: {
407: return $this->waterGrainRatio;
408: }
409:
410: }
411: