1: <?php
2:
3:
4: namespace BeerXML\Record;
5:
6:
7: use BeerXML\Generator\IYeastDisplay as YeastGetter;
8: use BeerXML\Parser\IYeastDisplay as YeastSetter;
9:
10: class Yeast implements YeastGetter, YeastSetter
11: {
12: const TYPE_LAGER = 'Lager';
13: const TYPE_ALE = 'Ale';
14: const TYPE_WHEAT = 'Wheat';
15: const TYPE_WINE = 'Wine';
16: const TYPE_CHAMPAGNE = 'Champagne';
17: const FORM_LIQUID = 'Liquid';
18: const FORM_DRY = 'Dry';
19: const FORM_SLANT = 'Slant';
20: const FORM_CULTURE = 'Culture';
21: const FLOCCULATION_LOW = 'Low';
22: const FLOCCULATION_MEDIUM = 'Medium';
23: const FLOCCULATION_HIGH = 'High';
24: const FLOCCULATION_VERY_HIGH = 'Very High';
25:
26:
27: /**
28: * Name of the yeast.
29: *
30: * @var string
31: */
32: private $name;
33:
34: /**
35: * Version of the standard. Should be "1" for this version.
36: *
37: * @var int
38: */
39: private $version = 1;
40:
41: /**
42: * May be "Ale", "Lager", "Wheat", "Wine" or "Champagne"
43: *
44: * @var string
45: */
46: private $type;
47:
48: /**
49: * May be "Liquid", "Dry", "Slant" or "Culture"
50: *
51: * @var string
52: */
53: private $form;
54:
55: /**
56: * The amount of yeast, measured in liters. For a starter this is the size of the starter. If the flag
57: * AMOUNT_IS_WEIGHT is set to TRUE then this measurement is in kilograms and not liters.
58: *
59: * @var number
60: */
61: private $amount;
62:
63: /**
64: * TRUE if the amount measurement is a weight measurement and FALSE if the amount is a volume measurement. Default
65: * value (if not present) is assumed to be FALSE – therefore the yeast measurement is a liquid amount by default.
66: *
67: * @var bool
68: */
69: private $amountIsWeight = false;
70:
71: /**
72: * The name of the laboratory that produced the yeast.
73: *
74: * @var string
75: */
76: private $laboratory;
77:
78: /**
79: * The manufacturer’s product ID label or number that identifies this particular strain of yeast.
80: *
81: * @var string
82: */
83: private $productId;
84:
85: /**
86: * The minimum recommended temperature for fermenting this yeast strain in degrees Celsius.
87: *
88: * @var number
89: */
90: private $minTemperature;
91:
92: /**
93: * The maximum recommended temperature for fermenting this yeast strain in Celsius.
94: *
95: * @var number
96: */
97: private $maxTemperature;
98:
99: /**
100: * May be "Low", "Medium", "High" or "Very High"
101: *
102: * @var string
103: */
104: private $flocculation;
105:
106: /**
107: * Average attenuation for this yeast strain.
108: *
109: * @var number
110: */
111: private $attenuation;
112:
113: /**
114: * Notes on this yeast strain. May be a multiline entry.
115: *
116: * @var string
117: */
118: private $notes;
119:
120: /**
121: * Styles or types of beer this yeast strain is best suited for.
122: *
123: * @var string
124: */
125: private $bestFor;
126:
127: /**
128: * Number of times this yeast has been reused as a harvested culture. This number should be zero if this is a
129: * product directly from the manufacturer.
130: *
131: * @var int
132: */
133: private $timesCultured;
134:
135: /**
136: * Recommended of times this yeast can be reused (recultured from a previous batch)
137: *
138: * @var int
139: */
140: private $maxReuse;
141:
142: /**
143: * Flag denoting that this yeast was added for a secondary (or later) fermentation as opposed to the primary
144: * fermentation. Useful if one uses two or more yeast strains for a single brew (eg: Lambic). Default value is
145: * FALSE.
146: *
147: * @var bool
148: */
149: private $addToSecondary = false;
150:
151: /** Fields from Appendix A Optional Extensions for BeerXML Display **/
152:
153: /**
154: * @var string
155: */
156: private $displayAmount;
157:
158: /**
159: * @var string
160: */
161: private $dispMinTemp;
162:
163: /**
164: * @var string
165: */
166: private $dispMaxTemp;
167:
168: /**
169: * @var string
170: */
171: private $inventory;
172:
173: /**
174: * @var \DateTime
175: */
176: private $cultureDate;
177:
178: /**
179: * Flag denoting that this yeast was added for a secondary (or later) fermentation as opposed to the primary
180: * fermentation. Useful if one uses two or more yeast strains for a single brew (eg: Lambic). Default value is
181: * FALSE.
182: *
183: * @param boolean $addToSecondary
184: */
185: public function setAddToSecondary($addToSecondary)
186: {
187: $this->addToSecondary = $addToSecondary;
188: }
189:
190: /**
191: * Flag denoting that this yeast was added for a secondary (or later) fermentation as opposed to the primary
192: * fermentation. Useful if one uses two or more yeast strains for a single brew (eg: Lambic). Default value is
193: * FALSE.
194: *
195: * @return boolean
196: */
197: public function getAddToSecondary()
198: {
199: return $this->addToSecondary;
200: }
201:
202: /**
203: * The amount of yeast, measured in liters. For a starter this is the size of the starter. If the flag
204: * AMOUNT_IS_WEIGHT is set to TRUE then this measurement is in kilograms and not liters.
205: *
206: * @param number $amount
207: */
208: public function setAmount($amount)
209: {
210: $this->amount = $amount;
211: }
212:
213: /**
214: * The amount of yeast, measured in liters. For a starter this is the size of the starter. If the flag
215: * AMOUNT_IS_WEIGHT is set to TRUE then this measurement is in kilograms and not liters.
216: *
217: * @return number
218: */
219: public function getAmount()
220: {
221: return $this->amount;
222: }
223:
224: /**
225: * @param boolean $amountIsWeight
226: */
227: public function setAmountIsWeight($amountIsWeight)
228: {
229: $this->amountIsWeight = $amountIsWeight;
230: }
231:
232: /**
233: * @return boolean
234: */
235: public function getAmountIsWeight()
236: {
237: return $this->amountIsWeight;
238: }
239:
240: /**
241: * Average attenuation for this yeast strain.
242: *
243: * @param number $attenuation
244: */
245: public function setAttenuation($attenuation)
246: {
247: $this->attenuation = $attenuation;
248: }
249:
250: /**
251: * Average attenuation for this yeast strain.
252: *
253: * @return number
254: */
255: public function getAttenuation()
256: {
257: return $this->attenuation;
258: }
259:
260: /**
261: * Styles or types of beer this yeast strain is best suited for.
262: *
263: * @param string $bestFor
264: */
265: public function setBestFor($bestFor)
266: {
267: $this->bestFor = $bestFor;
268: }
269:
270: /**
271: * Styles or types of beer this yeast strain is best suited for.
272: *
273: * @return string
274: */
275: public function getBestFor()
276: {
277: return $this->bestFor;
278: }
279:
280: /**
281: * May be "Low", "Medium", "High" or "Very High"
282: *
283: * @param string $flocculation
284: */
285: public function setFlocculation($flocculation)
286: {
287: $this->flocculation = $flocculation;
288: }
289:
290: /**
291: * May be "Low", "Medium", "High" or "Very High"
292: *
293: * @return string
294: */
295: public function getFlocculation()
296: {
297: return $this->flocculation;
298: }
299:
300: /**
301: * May be "Liquid", "Dry", "Slant" or "Culture"
302: *
303: * @param string $form
304: */
305: public function setForm($form)
306: {
307: $this->form = $form;
308: }
309:
310: /**
311: * May be "Liquid", "Dry", "Slant" or "Culture"
312: *
313: * @return string
314: */
315: public function getForm()
316: {
317: return $this->form;
318: }
319:
320: /**
321: * The name of the laboratory that produced the yeast.
322: *
323: * @param string $laboratory
324: */
325: public function setLaboratory($laboratory)
326: {
327: $this->laboratory = $laboratory;
328: }
329:
330: /**
331: * The name of the laboratory that produced the yeast.
332: *
333: * @return string
334: */
335: public function getLaboratory()
336: {
337: return $this->laboratory;
338: }
339:
340: /**
341: * Recommended of times this yeast can be reused (recultured from a previous batch)
342: *
343: * @param int $maxReuse
344: */
345: public function setMaxReuse($maxReuse)
346: {
347: $this->maxReuse = $maxReuse;
348: }
349:
350: /**
351: * Recommended of times this yeast can be reused (recultured from a previous batch)
352: *
353: * @return int
354: */
355: public function getMaxReuse()
356: {
357: return $this->maxReuse;
358: }
359:
360: /**
361: * The maximum recommended temperature for fermenting this yeast strain in Celsius.
362: *
363: * @param number $maxTemperature
364: */
365: public function setMaxTemperature($maxTemperature)
366: {
367: $this->maxTemperature = $maxTemperature;
368: }
369:
370: /**
371: * The maximum recommended temperature for fermenting this yeast strain in Celsius.
372: *
373: * @return number
374: */
375: public function getMaxTemperature()
376: {
377: return $this->maxTemperature;
378: }
379:
380: /**
381: * The minimum recommended temperature for fermenting this yeast strain in degrees Celsius.
382: *
383: * @param number $minTemperature
384: */
385: public function setMinTemperature($minTemperature)
386: {
387: $this->minTemperature = $minTemperature;
388: }
389:
390: /**
391: * The minimum recommended temperature for fermenting this yeast strain in degrees Celsius.
392: *
393: * @return number
394: */
395: public function getMinTemperature()
396: {
397: return $this->minTemperature;
398: }
399:
400: /**
401: * Name of the yeast.
402: *
403: * @param string $name
404: */
405: public function setName($name)
406: {
407: $this->name = $name;
408: }
409:
410: /**
411: * Name of the yeast.
412: *
413: * @return string
414: */
415: public function getName()
416: {
417: return $this->name;
418: }
419:
420: /**
421: * Notes on this yeast strain. May be a multiline entry.
422: *
423: * @param string $notes
424: */
425: public function setNotes($notes)
426: {
427: $this->notes = $notes;
428: }
429:
430: /**
431: * Notes on this yeast strain. May be a multiline entry.
432: *
433: * @return string
434: */
435: public function getNotes()
436: {
437: return $this->notes;
438: }
439:
440: /**
441: * The manufacturer’s product ID label or number that identifies this particular strain of yeast.
442: *
443: * @param string $productId
444: */
445: public function setProductId($productId)
446: {
447: $this->productId = $productId;
448: }
449:
450: /**
451: * The manufacturer’s product ID label or number that identifies this particular strain of yeast.
452: *
453: * @return string
454: */
455: public function getProductId()
456: {
457: return $this->productId;
458: }
459:
460: /**
461: * Number of times this yeast has been reused as a harvested culture. This number should be zero if this is a
462: * product directly from the manufacturer.
463: *
464: * @param int $timesCultured
465: */
466: public function setTimesCultured($timesCultured)
467: {
468: $this->timesCultured = $timesCultured;
469: }
470:
471: /**
472: * Number of times this yeast has been reused as a harvested culture. This number should be zero if this is a
473: * product directly from the manufacturer.
474: *
475: * @return int
476: */
477: public function getTimesCultured()
478: {
479: return $this->timesCultured;
480: }
481:
482: /**
483: * May be "Ale", "Lager", "Wheat", "Wine" or "Champagne"
484: *
485: * @param string $type
486: */
487: public function setType($type)
488: {
489: $this->type = $type;
490: }
491:
492: /**
493: * May be "Ale", "Lager", "Wheat", "Wine" or "Champagne"
494: *
495: * @return string
496: */
497: public function getType()
498: {
499: return $this->type;
500: }
501:
502: /**
503: * Version of the standard. Should be "1" for this version.
504: *
505: * @param int $version
506: */
507: public function setVersion($version)
508: {
509: $this->version = $version;
510: }
511:
512: /**
513: * Version of the standard. Should be "1" for this version.
514: *
515: * @return int
516: */
517: public function getVersion()
518: {
519: return $this->version;
520: }
521:
522: /**
523: * Date sample was last cultured
524: *
525: * @param \DateTime $cultureDate
526: */
527: public function setCultureDate($cultureDate)
528: {
529: $this->cultureDate = $cultureDate;
530: }
531:
532: /**
533: * Date sample was last cultured
534: *
535: * @return \DateTime
536: */
537: public function getCultureDate()
538: {
539: return $this->cultureDate;
540: }
541:
542: /**
543: * Maximum fermentation temperature converted to current user units along with the units. For example "54.0 F" or
544: * "24.2 C"
545: *
546: * @param string $dispMaxTemp
547: */
548: public function setDispMaxTemp($dispMaxTemp)
549: {
550: $this->dispMaxTemp = $dispMaxTemp;
551: }
552:
553: /**
554: * Maximum fermentation temperature converted to current user units along with the units. For example "54.0 F" or
555: * "24.2 C"
556: *
557: * @return string
558: */
559: public function getDispMaxTemp()
560: {
561: return $this->dispMaxTemp;
562: }
563:
564: /**
565: * Minimum fermentation temperature converted to current user units along with the units. For example "54.0 F" or
566: * "24.2 C"
567: *
568: * @param string $dispMinTemp
569: */
570: public function setDispMinTemp($dispMinTemp)
571: {
572: $this->dispMinTemp = $dispMinTemp;
573: }
574:
575: /**
576: * Minimum fermentation temperature converted to current user units along with the units. For example "54.0 F" or
577: * "24.2 C"
578: *
579: * @return string
580: */
581: public function getDispMinTemp()
582: {
583: return $this->dispMinTemp;
584: }
585:
586: /**
587: * The amount of yeast or starter in this record along with the units formatted for easy display in the current user
588: * defined units. For example "1.5 oz" or "100 g".
589: *
590: * @param string $displayAmount
591: */
592: public function setDisplayAmount($displayAmount)
593: {
594: $this->displayAmount = $displayAmount;
595: }
596:
597: /**
598: * The amount of yeast or starter in this record along with the units formatted for easy display in the current user
599: * defined units. For example "1.5 oz" or "100 g".
600: *
601: * @return string
602: */
603: public function getDisplayAmount()
604: {
605: return $this->displayAmount;
606: }
607:
608: /**
609: * Amount in inventory for this hop along with the units – for example "10.0 pkgs"
610: *
611: * @param string $inventory
612: */
613: public function setInventory($inventory)
614: {
615: $this->inventory = $inventory;
616: }
617:
618: /**
619: * Amount in inventory for this hop along with the units – for example "10.0 pkgs"
620: *
621: * @return string
622: */
623: public function getInventory()
624: {
625: return $this->inventory;
626: }
627:
628:
629: }