Overview

Namespaces

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

Classes

  • Equipment
  • Fermentable
  • Hop
  • MashProfile
  • MashStep
  • Misc
  • Recipe
  • Record
  • 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\Generator;
 5: 
 6: 
 7: class Fermentable extends Record
 8: {
 9: 
10:     protected $tagName = 'FERMENTABLE';
11: 
12:     /**
13:      * @var \BeerXML\Record\Fermentable
14:      */
15:     protected $record;
16: 
17:     /**
18:      * <TAG> => getterMethod
19:      *
20:      * @var array
21:      */
22:     protected $simpleValues = array(
23:         'NAME'    => 'getName',
24:         'VERSION' => 'getVersion',
25:         'TYPE'    => 'getType',
26:         'AMOUNT'  => 'getAmount',
27:         'YIELD'   => 'getYield',
28:         'COLOR'   => 'getColor',
29:     );
30: 
31:     protected $optionalSimpleValues = array(
32:         'ORIGIN'           => 'getOrigin',
33:         'SUPPLIER'         => 'getSupplier',
34:         'NOTES'            => 'getNotes',
35:         'COARSE_FINE_DIFF' => 'getCoarseFineDiff',
36:         'MOISTURE'         => 'getMoisture',
37:         'DIASTATIC_POWER'  => 'getDiastaticPower',
38:         'PROTEIN'          => 'getProtein',
39:         'MAX_IN_BATCH'     => 'getMaxInBatch',
40:         'IBU_GAL_PER_LB'   => 'getIbuGalPerLb',
41:     );
42: 
43:     protected $displayInterface = 'BeerXML\Generator\IFermentableDisplay';
44: 
45:     protected $displayValues = array(
46:         'DISPLAY_AMOUNT' => 'getDisplayAmount',
47:         'POTENTIAL'      => 'getPotential',
48:         'INVENTORY'      => 'getInventory',
49:         'DISPLAY_COLOR'  => 'getDisplayColor',
50:     );
51: 
52:     /**
53:      * @{inheritDoc}
54:      */
55:     protected function additionalFields()
56:     {
57:         $this->xmlWriter->writeElement('ADD_AFTER_BOIL', $this->boolToString($this->record->getAddAfterBoil()));
58:         $this->xmlWriter->writeElement('MAX_IN_BATCH', $this->boolToString($this->record->getRecommendMash()));
59: 
60:         return parent::additionalFields();
61:     }
62: }
php-beerxml API documentation generated by ApiGen 2.8.0