1: <?php
2:
3:
4: namespace BeerXML\Generator;
5:
6:
7: class MashStep extends Record
8: {
9: protected $tagName = 'MASH_STEP';
10:
11: 12: 13:
14: protected $record;
15:
16: 17: 18: 19: 20:
21: protected $simpleValues = array(
22: 'NAME' => 'getName',
23: 'VERSION' => 'getVersion',
24: 'TYPE' => 'getType',
25: 'INFUSE_AMOUNT' => 'getInfuseAmount',
26: 'STEP_TEMP' => 'getStepTemp',
27: 'STEP_TIME' => 'getStepTime',
28: );
29:
30: 31: 32: 33: 34:
35: protected $optionalSimpleValues = array(
36: 'RAMP_TIME' => 'getRampTime',
37: 'END_TEMP' => 'getEndTemp',
38: );
39:
40: protected $displayInterface = 'BeerXML\Generator\IMashStepDisplay';
41:
42: protected $displayValues = array(
43: 'DESCRIPTION' => 'getDescription',
44: 'WATER_GRAIN_RATIO' => 'getWaterGrainRatio',
45: 'DECOCTION_AMT' => 'getDecoctionAmt',
46: 'INFUSE_TEMP' => 'getInfuseTemp',
47: 'DISPLAY_STEP_TEMP' => 'getDisplayStepTemp',
48: 'DISPLAY_INFUSE_AMT' => 'getDisplayInfuseAmt',
49: );
50:
51: 52: 53:
54: protected function additionalFields()
55: {
56: if (\BeerXML\Record\MashStep::TYPE_DECOCTION != $this->record->getType()) {
57: $this->xmlWriter->writeElement('INFUSE_AMOUNT', $this->record->getInfuseAmount());
58: }
59:
60: return parent::additionalFields();
61: }
62:
63: }