Overview

Namespaces

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

Classes

  • Equipment
  • Fermentable
  • Hop
  • MashProfile
  • MashStep
  • Misc
  • Recipe
  • Record
  • RecordFactory
  • Style
  • Water
  • Yeast

Interfaces

  • IEquipment
  • IEquipmentDisplay
  • IFermentable
  • IFermentableDisplay
  • IHop
  • IHopDisplay
  • IMashProfile
  • IMashProfileDisplay
  • IMashStep
  • IMashStepDisplay
  • IMisc
  • IMiscDisplay
  • IRecipe
  • IRecipeDisplay
  • IStyle
  • IStyleDisplay
  • IWater
  • IWaterDisplay
  • IYeast
  • IYeastDisplay
  • Overview
  • Namespace
  • Class
  • Tree
 1: <?php
 2: 
 3: 
 4: namespace BeerXML\Parser;
 5: 
 6: 
 7: class Hop extends Record
 8: {
 9:     protected $tagName = 'HOP';
10: 
11:     /**
12:      * Tags that map to simple values and the corresponding setter method on the record class
13:      *
14:      * @var array
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:      * @return IHop
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: }
php-beerxml API documentation generated by ApiGen 2.8.0