1: <?php
2:
3:
4: namespace BeerXML\Parser;
5:
6:
7: class Hop extends Record
8: {
9: protected $tagName = 'HOP';
10:
11: 12: 13: 14: 15:
16: protected $simpleProperties = array(
17: 'NAME' => 'setName',
18: 'VERSION' => 'setVersion',
19: 'ALPHA' => 'setAlpha',
20: 'AMOUNT' => 'setAmount',
21: 'USE' => 'setUse',
22: 'TIME' => 'setTime',
23: 'NOTES' => 'setNotes',
24: 'TYPE' => 'setType',
25: 'FORM' => 'setForm',
26: 'BETA' => 'setBeta',
27: 'HSI' => 'setHsi',
28: 'ORIGIN' => 'setOrigin',
29: 'SUBSTITUTES' => 'setSubstitutes',
30: 'HUMULENE' => 'setHumulene',
31: 'CARYOPHYLLENE' => 'setCaryophyllene',
32: 'COHUMULONE' => 'setCohumulone',
33: 'MYRCENE' => 'setMyrcene',
34: );
35:
36: 37: 38:
39: protected function createRecord()
40: {
41: $hop = $this->recordFactory->getHop();
42: if ($hop instanceof IHopDisplay) {
43: $this->simpleProperties = array_merge(
44: $this->simpleProperties,
45: array(
46: 'DISPLAY_AMOUNT' => 'setDisplayAmount',
47: 'INVENTORY' => 'setInventory',
48: 'DISPLAY_TIME' => 'setDisplayTime',
49: )
50: );
51: }
52: return $hop;
53: }
54: }