1: <?php
2:
3:
4: namespace BeerXML\Generator;
5:
6:
7: class Misc extends Record
8: {
9: protected $tagName = 'MISC';
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: 'USE' => 'getUse',
26: 'TIME' => 'getTime',
27: 'AMOUNT' => 'getAmount',
28:
29: );
30:
31: 32: 33: 34: 35:
36: protected $optionalSimpleValues = array(
37: 'USE_FOR' => 'getUseFor',
38: 'NOTES' => 'getNotes',
39: );
40:
41: protected $displayInterface = 'BeerXML\Generator\IMiscDisplay';
42:
43: protected $displayValues = array(
44: 'DISPLAY_AMOUNT' => 'getDisplayAmount',
45: 'INVENTORY' => 'getInventory',
46: 'DISPLAY_TIME' => 'getDisplayTime',
47: );
48:
49: 50: 51:
52: protected function additionalFields()
53: {
54: if ($amountIsWeight = $this->record->getAmountIsWeight()) {
55: $this->xmlWriter->writeElement('AMOUNT_IS_WEIGHT', $this->boolToString($amountIsWeight));
56: }
57:
58: parent::additionalFields();
59: }
60:
61:
62: }