Overview

Namespaces

  • BeerXML
    • Exception
    • Generator
    • Parser
    • Record
  • PHP

Classes

  • Equipment
  • Fermentable
  • Hop
  • MashProfile
  • MashStep
  • Misc
  • Recipe
  • Style
  • Water
  • Yeast
  • Overview
  • Namespace
  • Class
  • Tree
  1: <?php
  2: 
  3: 
  4: namespace BeerXML\Record;
  5: 
  6: 
  7: use BeerXML\Generator\IEquipmentDisplay as EquipmentGetter;
  8: use BeerXML\Parser\IEquipmentDisplay as EquipmentSetter;
  9: 
 10: class Equipment implements EquipmentGetter, EquipmentSetter
 11: {
 12:     /**
 13:      * Name of the equipment profile – usually a text description of the brewing setup.
 14:      *
 15:      * @var string
 16:      */
 17:     private $name;
 18: 
 19:     /**
 20:      * Version of the equipment 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 pre-boil volume used in this particular instance for this equipment setup.  Note that this may be a
 28:      * calculated value depending on the CALC_BOIL_VOLUME parameter.
 29:      *
 30:      * @var float
 31:      */
 32:     private $boilSize;
 33: 
 34:     /**
 35:      * The target volume of the batch at the start of fermentation.
 36:      *
 37:      * @var float
 38:      */
 39:     private $batchSize;
 40: 
 41:     /**
 42:      * Volume of the mash tun in liters.  This parameter can be used to calculate if a particular mash and grain profile
 43:      * will fit in the mash tun.  It may also be used for thermal calculations in the case of a partially full mash tun.
 44:      *
 45:      * @var float
 46:      */
 47:     private $tunVolume;
 48: 
 49:     /**
 50:      * Weight of the mash tun in kilograms.  Used primarily to calculate the thermal parameters of the mash tun – in
 51:      * conjunction with the volume and specific heat.
 52:      *
 53:      * @var float
 54:      */
 55:     private $tunWeight;
 56: 
 57:     /**
 58:      * The specific heat of the mash tun which is usually a function of the material it is made of.  Typical ranges are
 59:      * 0.1-0.25 for metal and 0.2-0.5 for plastic materials.
 60:      *
 61:      * @var float
 62:      */
 63:     private $tunSpecificHeat;
 64: 
 65:     /**
 66:      * The amount of top up water normally added just prior to starting fermentation.  Usually used for extract brewing.
 67:      *
 68:      * @var float
 69:      */
 70:     private $topUpWater;
 71: 
 72:     /**
 73:      * The amount of wort normally lost during transition from the boiler to the fermentation vessel.  Includes both
 74:      * unusable wort due to trub and wort lost to the chiller and transfer systems.
 75:      *
 76:      * @var float
 77:      */
 78:     private $trubChillerLoss;
 79: 
 80:     /**
 81:      * The percentage of wort lost to evaporation per hour of the boil.
 82:      *
 83:      * @var float
 84:      */
 85:     private $evapRate;
 86: 
 87:     /**
 88:      * The normal amount of time one boils for this equipment setup.  This can be used with the evaporation rate to
 89:      * calculate the evaporation loss.
 90:      *
 91:      * @var number
 92:      */
 93:     private $boilTime;
 94: 
 95:     /**
 96:      * Flag denoting that the program should calculate the boil size.  Flag may be TRUE or FALSE.
 97:      * If TRUE, then BOIL_SIZE = (BATCH_SIZE – TOP_UP_WATER – TRUB_CHILLER_LOSS) * (1+BOIL_TIME * EVAP_RATE )
 98:      * If set then the boil size should match this value.
 99:      *
100:      * @var bool
101:      */
102:     private $calcBoilVolume;
103: 
104:     /**
105:      * Amount lost to the lauter tun and equipment associated with the lautering process.
106:      *
107:      * @var number
108:      */
109:     private $lauterDeadspace;
110: 
111:     /**
112:      * Amount normally added to the boil kettle before the boil.
113:      *
114:      * @var number
115:      */
116:     private $topUpKettle;
117: 
118:     /**
119:      * Large batch hop utilization.  This value should be 100% for batches less than 20 gallons, but may be higher
120:      * (200% or more) for very large batch equipment.
121:      *
122:      * @var float
123:      */
124:     private $hopUtilization;
125: 
126:     /**
127:      * Notes associated with the equipment.  May be a multiline entry.
128:      *
129:      * @var string
130:      */
131:     private $notes;
132: 
133:     /** Fields from Appendix A Optional Extensions for BeerXML Display **/
134: 
135:     /**
136:      * @var string
137:      */
138:     private $displayBoilSize;
139: 
140:     /**
141:      * @var string
142:      */
143:     private $displayBatchSize;
144: 
145:     /**
146:      * @var string
147:      */
148:     private $displayTunVolume;
149: 
150:     /**
151:      * @var string
152:      */
153:     private $displayTunWeight;
154: 
155:     /**
156:      * @var string
157:      */
158:     private $displayTopUpWater;
159: 
160:     /**
161:      * @var string
162:      */
163:     private $displayTrubChillerLoss;
164: 
165:     /**
166:      * @var string
167:      */
168:     private $displayLauterDeadspace;
169: 
170:     /**
171:      * @var string
172:      */
173:     private $displayTopUpKettle;
174: 
175:     /**
176:      * The target volume of the batch at the start of fermentation.
177:      *
178:      * @param float $batchSize
179:      */
180:     public function setBatchSize($batchSize)
181:     {
182:         $this->batchSize = $batchSize;
183:     }
184: 
185:     /**
186:      * The target volume of the batch at the start of fermentation.
187:      *
188:      * @return float
189:      */
190:     public function getBatchSize()
191:     {
192:         return $this->batchSize;
193:     }
194: 
195:     /**
196:      * The pre-boil volume used in this particular instance for this equipment setup.  Note that this may be a
197:      * calculated value depending on the CALC_BOIL_VOLUME parameter.
198:      *
199:      * @param float $boilSize
200:      */
201:     public function setBoilSize($boilSize)
202:     {
203:         $this->boilSize = $boilSize;
204:     }
205: 
206:     /**
207:      * The pre-boil volume used in this particular instance for this equipment setup.  Note that this may be a
208:      * calculated value depending on the CALC_BOIL_VOLUME parameter.
209:      *
210:      * @return float
211:      */
212:     public function getBoilSize()
213:     {
214:         return $this->boilSize;
215:     }
216: 
217:     /**
218:      * The normal amount of time one boils for this equipment setup.  This can be used with the evaporation rate to
219:      * calculate the evaporation loss.
220:      *
221:      * @param number $boilTime
222:      */
223:     public function setBoilTime($boilTime)
224:     {
225:         $this->boilTime = $boilTime;
226:     }
227: 
228:     /**
229:      * The normal amount of time one boils for this equipment setup.  This can be used with the evaporation rate to
230:      * calculate the evaporation loss.
231:      *
232:      * @return number
233:      */
234:     public function getBoilTime()
235:     {
236:         return $this->boilTime;
237:     }
238: 
239:     /**
240:      * Flag denoting that the program should calculate the boil size.  Flag may be TRUE or FALSE.
241:      * If TRUE, then BOIL_SIZE = (BATCH_SIZE – TOP_UP_WATER – TRUB_CHILLER_LOSS) * (1+BOIL_TIME * EVAP_RATE )
242:      * If set then the boil size should match this value.
243:      *
244:      * @param boolean $calcBoilVolume
245:      */
246:     public function setCalcBoilVolume($calcBoilVolume)
247:     {
248:         $this->calcBoilVolume = $calcBoilVolume;
249:     }
250: 
251:     /**
252:      * Flag denoting that the program should calculate the boil size.  Flag may be TRUE or FALSE.
253:      * If TRUE, then BOIL_SIZE = (BATCH_SIZE – TOP_UP_WATER – TRUB_CHILLER_LOSS) * (1+BOIL_TIME * EVAP_RATE )
254:      * If set then the boil size should match this value.
255:      *
256:      * @return boolean
257:      */
258:     public function getCalcBoilVolume()
259:     {
260:         return $this->calcBoilVolume;
261:     }
262: 
263:     /**
264:      * The percentage of wort lost to evaporation per hour of the boil.
265:      *
266:      * @param float $evapRate
267:      */
268:     public function setEvapRate($evapRate)
269:     {
270:         $this->evapRate = $evapRate;
271:     }
272: 
273:     /**
274:      * The percentage of wort lost to evaporation per hour of the boil.
275:      *
276:      * @return float
277:      */
278:     public function getEvapRate()
279:     {
280:         return $this->evapRate;
281:     }
282: 
283:     /**
284:      * Large batch hop utilization.  This value should be 100% for batches less than 20 gallons, but may be higher
285:      * (200% or more) for very large batch equipment.
286:      *
287:      * @param float $hopUtilization
288:      */
289:     public function setHopUtilization($hopUtilization)
290:     {
291:         $this->hopUtilization = $hopUtilization;
292:     }
293: 
294:     /**
295:      * Large batch hop utilization.  This value should be 100% for batches less than 20 gallons, but may be higher
296:      * (200% or more) for very large batch equipment.
297:      *
298:      * @return float
299:      */
300:     public function getHopUtilization()
301:     {
302:         return $this->hopUtilization;
303:     }
304: 
305:     /**
306:      * Amount lost to the lauter tun and equipment associated with the lautering process.
307:      *
308:      * @param number $lauterDeadspace
309:      */
310:     public function setLauterDeadspace($lauterDeadspace)
311:     {
312:         $this->lauterDeadspace = $lauterDeadspace;
313:     }
314: 
315:     /**
316:      * Amount lost to the lauter tun and equipment associated with the lautering process.
317:      *
318:      * @return number
319:      */
320:     public function getLauterDeadspace()
321:     {
322:         return $this->lauterDeadspace;
323:     }
324: 
325:     /**
326:      * Name of the equipment profile – usually a text description of the brewing setup.
327:      *
328:      * @param string $name
329:      */
330:     public function setName($name)
331:     {
332:         $this->name = $name;
333:     }
334: 
335:     /**
336:      * Name of the equipment profile – usually a text description of the brewing setup.
337:      *
338:      * @return string
339:      */
340:     public function getName()
341:     {
342:         return $this->name;
343:     }
344: 
345:     /**
346:      * Notes associated with the equipment.  May be a multiline entry.
347:      *
348:      * @param string $notes
349:      */
350:     public function setNotes($notes)
351:     {
352:         $this->notes = $notes;
353:     }
354: 
355:     /**
356:      * Notes associated with the equipment.  May be a multiline entry.
357:      *
358:      * @return string
359:      */
360:     public function getNotes()
361:     {
362:         return $this->notes;
363:     }
364: 
365:     /**
366:      * Amount normally added to the boil kettle before the boil.
367:      *
368:      * @param number $topUpKettle
369:      */
370:     public function setTopUpKettle($topUpKettle)
371:     {
372:         $this->topUpKettle = $topUpKettle;
373:     }
374: 
375:     /**
376:      * Amount normally added to the boil kettle before the boil.
377:      *
378:      * @return number
379:      */
380:     public function getTopUpKettle()
381:     {
382:         return $this->topUpKettle;
383:     }
384: 
385:     /**
386:      * @param float $topUpWater
387:      */
388:     public function setTopUpWater($topUpWater)
389:     {
390:         $this->topUpWater = $topUpWater;
391:     }
392: 
393:     /**
394:      * @return float
395:      */
396:     public function getTopUpWater()
397:     {
398:         return $this->topUpWater;
399:     }
400: 
401:     /**
402:      * The amount of wort normally lost during transition from the boiler to the fermentation vessel.  Includes both
403:      * unusable wort due to trub and wort lost to the chiller and transfer systems.
404:      *
405:      * @param float $trubChillerLoss
406:      */
407:     public function setTrubChillerLoss($trubChillerLoss)
408:     {
409:         $this->trubChillerLoss = $trubChillerLoss;
410:     }
411: 
412:     /**
413:      * The amount of wort normally lost during transition from the boiler to the fermentation vessel.  Includes both
414:      * unusable wort due to trub and wort lost to the chiller and transfer systems.
415:      *
416:      * @return float
417:      */
418:     public function getTrubChillerLoss()
419:     {
420:         return $this->trubChillerLoss;
421:     }
422: 
423:     /**
424:      * The specific heat of the mash tun which is usually a function of the material it is made of.  Typical ranges are
425:      * 0.1-0.25 for metal and 0.2-0.5 for plastic materials.
426:      *
427:      * @param float $tunSpecificHeat
428:      */
429:     public function setTunSpecificHeat($tunSpecificHeat)
430:     {
431:         $this->tunSpecificHeat = $tunSpecificHeat;
432:     }
433: 
434:     /**
435:      * The specific heat of the mash tun which is usually a function of the material it is made of.  Typical ranges are
436:      * 0.1-0.25 for metal and 0.2-0.5 for plastic materials.
437:      *
438:      * @return float
439:      */
440:     public function getTunSpecificHeat()
441:     {
442:         return $this->tunSpecificHeat;
443:     }
444: 
445:     /**
446:      * Volume of the mash tun in liters.  This parameter can be used to calculate if a particular mash and grain profile
447:      * will fit in the mash tun.  It may also be used for thermal calculations in the case of a partially full mash tun.
448:      *
449:      * @param float $tunVolume
450:      */
451:     public function setTunVolume($tunVolume)
452:     {
453:         $this->tunVolume = $tunVolume;
454:     }
455: 
456:     /**
457:      * Volume of the mash tun in liters.  This parameter can be used to calculate if a particular mash and grain profile
458:      * will fit in the mash tun.  It may also be used for thermal calculations in the case of a partially full mash tun.
459:      *
460:      * @return float
461:      */
462:     public function getTunVolume()
463:     {
464:         return $this->tunVolume;
465:     }
466: 
467:     /**
468:      * Weight of the mash tun in kilograms.  Used primarily to calculate the thermal parameters of the mash tun – in
469:      * conjunction with the volume and specific heat.
470:      *
471:      * @param float $tunWeight
472:      */
473:     public function setTunWeight($tunWeight)
474:     {
475:         $this->tunWeight = $tunWeight;
476:     }
477: 
478:     /**
479:      * Weight of the mash tun in kilograms.  Used primarily to calculate the thermal parameters of the mash tun – in
480:      * conjunction with the volume and specific heat.
481:      *
482:      * @return float
483:      */
484:     public function getTunWeight()
485:     {
486:         return $this->tunWeight;
487:     }
488: 
489:     /**
490:      * Version of the equipment record.  Should always be "1" for this version of the XML standard.
491:      *
492:      * @param int $version
493:      */
494:     public function setVersion($version)
495:     {
496:         $this->version = $version;
497:     }
498: 
499:     /**
500:      * Version of the equipment record.  Should always be "1" for this version of the XML standard.
501:      *
502:      * @return int
503:      */
504:     public function getVersion()
505:     {
506:         return $this->version;
507:     }
508: 
509:     /**
510:      * The target volume of the batch at the start of fermentation in display volume units such as "5.0 gal"
511:      *
512:      * @param string $displayBatchSize
513:      */
514:     public function setDisplayBatchSize($displayBatchSize)
515:     {
516:         $this->displayBatchSize = $displayBatchSize;
517:     }
518: 
519:     /**
520:      * The target volume of the batch at the start of fermentation in display volume units such as "5.0 gal"
521:      *
522:      * @return string
523:      */
524:     public function getDisplayBatchSize()
525:     {
526:         return $this->displayBatchSize;
527:     }
528: 
529:     /**
530:      * The pre-boil volume normally used for a batch of this size shown in display volume units such as "5.5 gal"
531:      *
532:      * @param string $displayBoilSize
533:      */
534:     public function setDisplayBoilSize($displayBoilSize)
535:     {
536:         $this->displayBoilSize = $displayBoilSize;
537:     }
538: 
539:     /**
540:      * The pre-boil volume normally used for a batch of this size shown in display volume units such as "5.5 gal"
541:      *
542:      * @return string
543:      */
544:     public function getDisplayBoilSize()
545:     {
546:         return $this->displayBoilSize;
547:     }
548: 
549:     /**
550:      * Amount lost to the lauter tun and equipment associated with the lautering process. Ex: "2.0 gal" or "1.0 l"
551:      *
552:      * @param string $displayLauterDeadspace
553:      */
554:     public function setDisplayLauterDeadspace($displayLauterDeadspace)
555:     {
556:         $this->displayLauterDeadspace = $displayLauterDeadspace;
557:     }
558: 
559:     /**
560:      * Amount lost to the lauter tun and equipment associated with the lautering process. Ex: "2.0 gal" or "1.0 l"
561:      *
562:      * @return string
563:      */
564:     public function getDisplayLauterDeadspace()
565:     {
566:         return $this->displayLauterDeadspace;
567:     }
568: 
569:     /**
570:      * Amount normally added to the boil kettle before the boil. Ex: "1.0 gal"
571:      *
572:      * @param string $displayTopUpKettle
573:      */
574:     public function setDisplayTopUpKettle($displayTopUpKettle)
575:     {
576:         $this->displayTopUpKettle = $displayTopUpKettle;
577:     }
578: 
579:     /**
580:      * Amount normally added to the boil kettle before the boil. Ex: "1.0 gal"
581:      *
582:      * @return string
583:      */
584:     public function getDisplayTopUpKettle()
585:     {
586:         return $this->displayTopUpKettle;
587:     }
588: 
589:     /**
590:      * The amount of top up water normally added just prior to starting fermentation in display volume such as "1.0 gal"
591:      *
592:      * @param string $displayTopUpWater
593:      */
594:     public function setDisplayTopUpWater($displayTopUpWater)
595:     {
596:         $this->displayTopUpWater = $displayTopUpWater;
597:     }
598: 
599:     /**
600:      * The amount of top up water normally added just prior to starting fermentation in display volume such as "1.0 gal"
601:      *
602:      * @return string
603:      */
604:     public function getDisplayTopUpWater()
605:     {
606:         return $this->displayTopUpWater;
607:     }
608: 
609:     /**
610:      * The amount of wort normally lost during transition from the boiler to the fermentation vessel.
611:      *
612:      * Includes both unusable wort due to trub and wort lost to the chiller and transfer systems.  Expressed in user
613:      * units - Ex: "1.5 qt"
614:      *
615:      * @param string $displayTrubChillerLoss
616:      */
617:     public function setDisplayTrubChillerLoss($displayTrubChillerLoss)
618:     {
619:         $this->displayTrubChillerLoss = $displayTrubChillerLoss;
620:     }
621: 
622:     /**
623:      * The amount of wort normally lost during transition from the boiler to the fermentation vessel.
624:      *
625:      * Includes both unusable wort due to trub and wort lost to the chiller and transfer systems.  Expressed in user
626:      * units - Ex: "1.5 qt"
627:      *
628:      * @return string
629:      */
630:     public function getDisplayTrubChillerLoss()
631:     {
632:         return $this->displayTrubChillerLoss;
633:     }
634: 
635:     /**
636:      * Volume of the mash tun in display units such as "10.0 gal" or "20.0 l"
637:      *
638:      * @param string $displayTunVolume
639:      */
640:     public function setDisplayTunVolume($displayTunVolume)
641:     {
642:         $this->displayTunVolume = $displayTunVolume;
643:     }
644: 
645:     /**
646:      * Volume of the mash tun in display units such as "10.0 gal" or "20.0 l"
647:      *
648:      * @return string
649:      */
650:     public function getDisplayTunVolume()
651:     {
652:         return $this->displayTunVolume;
653:     }
654: 
655:     /**
656:      * Weight of the mash tun in display units such as "3.0 kg" or "6.0 lb"
657:      *
658:      * @param string $displayTunWeight
659:      */
660:     public function setDisplayTunWeight($displayTunWeight)
661:     {
662:         $this->displayTunWeight = $displayTunWeight;
663:     }
664: 
665:     /**
666:      * Weight of the mash tun in display units such as "3.0 kg" or "6.0 lb"
667:      *
668:      * @return string
669:      */
670:     public function getDisplayTunWeight()
671:     {
672:         return $this->displayTunWeight;
673:     }
674: 
675: }
676: 
php-beerxml API documentation generated by ApiGen 2.8.0