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 Water extends Record
 8: {
 9:     protected $tagName = 'WATER';
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:         'AMOUNT'      => 'setAmount',
20:         'CALCIUM'     => 'setCalcium',
21:         'BICARBONATE' => 'setBicarbonate',
22:         'SULFATE'     => 'setSulfate',
23:         'CHLORIDE'    => 'setChloride',
24:         'SODIUM'      => 'setSodium',
25:         'MAGNESIUM'   => 'setMagnesium',
26:         'PH'          => 'setPH',
27:         'NOTES'       => 'setNotes',
28:     );
29: 
30:     /**
31:      * @return IWater
32:      */
33:     protected function createRecord()
34:     {
35:         $water = $this->recordFactory->getWater();
36:         if ($water instanceof IWaterDisplay) {
37:             $this->simpleProperties = array_merge(
38:                 $this->simpleProperties,
39:                 array(
40:                     'DISPLAY_AMOUNT' => 'setDisplayAmount',
41:                 )
42:             );
43:         }
44:         return $water;
45:     }
46: }
php-beerxml API documentation generated by ApiGen 2.8.0