Overview

Namespaces

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

Classes

  • Equipment
  • Fermentable
  • Hop
  • MashProfile
  • MashStep
  • Misc
  • Recipe
  • Style
  • Water
  • Yeast
  • Overview
  • Namespace
  • Class
  • Tree
  1: <?php
  2: 
  3: 
  4: namespace BeerXML\Record;
  5: 
  6: 
  7: use BeerXML\Generator\IWaterDisplay as WaterGetter;
  8: use BeerXML\Parser\IWaterDisplay as WaterSetter;
  9: 
 10: class Water implements WaterGetter, WaterSetter
 11: {
 12:     /**
 13:      * Name of the water profile – usually the city and country of the water profile.
 14:      *
 15:      * @var string
 16:      */
 17:     private $name;
 18: 
 19:     /**
 20:      * Version of the water record.  Should always be "1" for this version of the XML standard.
 21:      *
 22:      * @var int
 23:      */
 24:     private $version = 1;
 25: 
 26:     /**
 27:      * Volume of water to use in a recipe in liters.
 28:      *
 29:      * @var number
 30:      */
 31:     private $amount;
 32: 
 33:     /**
 34:      * The amount of calcium (Ca) in parts per million.
 35:      *
 36:      * @var float
 37:      */
 38:     private $calcium;
 39: 
 40:     /**
 41:      * The amount of bicarbonate (HCO3) in parts per million.
 42:      *
 43:      * @var float
 44:      */
 45:     private $bicarbonate;
 46: 
 47:     /**
 48:      * The amount of Sulfate (SO4) in parts per million.
 49:      *
 50:      * @var float
 51:      */
 52:     private $sulfate;
 53: 
 54:     /**
 55:      * The amount of Chloride (Cl) in parts per million.
 56:      *
 57:      * @var float
 58:      */
 59:     private $chloride;
 60: 
 61:     /**
 62:      * The amount of Sodium (Na) in parts per million.
 63:      *
 64:      * @var float
 65:      */
 66:     private $sodium;
 67: 
 68:     /**
 69:      * The amount of Magnesium (Mg) in parts per million.
 70:      *
 71:      * @var float
 72:      */
 73:     private $magnesium;
 74: 
 75:     /**
 76:      * The PH of the water.
 77:      *
 78:      * @var float
 79:      */
 80:     private $pH;
 81: 
 82:     /**
 83:      * Notes about the water profile.  May be multiline.
 84:      *
 85:      * @var string
 86:      */
 87:     private $notes;
 88: 
 89:     /** Fields from Appendix A Optional Extensions for BeerXML Display **/
 90: 
 91:     /**
 92:      * @var string
 93:      */
 94:     private $displayAmount;
 95: 
 96:     /**
 97:      * Volume of water to use in a recipe in liters.
 98:      *
 99:      * @param number $amount
100:      */
101:     public function setAmount($amount)
102:     {
103:         $this->amount = $amount;
104:     }
105: 
106:     /**
107:      * Volume of water to use in a recipe in liters.
108:      *
109:      * @return number
110:      */
111:     public function getAmount()
112:     {
113:         return $this->amount;
114:     }
115: 
116:     /**
117:      * The amount of bicarbonate (HCO3) in parts per million.
118:      *
119:      * @param float $bicarbonate
120:      */
121:     public function setBicarbonate($bicarbonate)
122:     {
123:         $this->bicarbonate = $bicarbonate;
124:     }
125: 
126:     /**
127:      * The amount of bicarbonate (HCO3) in parts per million.
128:      *
129:      * @return float
130:      */
131:     public function getBicarbonate()
132:     {
133:         return $this->bicarbonate;
134:     }
135: 
136:     /**
137:      * The amount of calcium (Ca) in parts per million.
138:      *
139:      * @param float $calcium
140:      */
141:     public function setCalcium($calcium)
142:     {
143:         $this->calcium = $calcium;
144:     }
145: 
146:     /**
147:      * The amount of calcium (Ca) in parts per million.
148:      *
149:      * @return float
150:      */
151:     public function getCalcium()
152:     {
153:         return $this->calcium;
154:     }
155: 
156:     /**
157:      * @param float $chloride
158:      */
159:     public function setChloride($chloride)
160:     {
161:         $this->chloride = $chloride;
162:     }
163: 
164:     /**
165:      * @return float
166:      */
167:     public function getChloride()
168:     {
169:         return $this->chloride;
170:     }
171: 
172:     /**
173:      * The amount of Magnesium (Mg) in parts per million.
174:      *
175:      * @param float $magnesium
176:      */
177:     public function setMagnesium($magnesium)
178:     {
179:         $this->magnesium = $magnesium;
180:     }
181: 
182:     /**
183:      * The amount of Magnesium (Mg) in parts per million.
184:      *
185:      * @return float
186:      */
187:     public function getMagnesium()
188:     {
189:         return $this->magnesium;
190:     }
191: 
192:     /**
193:      * Name of the water profile – usually the city and country of the water profile.
194:      *
195:      * @param string $name
196:      */
197:     public function setName($name)
198:     {
199:         $this->name = $name;
200:     }
201: 
202:     /**
203:      * Name of the water profile – usually the city and country of the water profile.
204:      *
205:      * @return string
206:      */
207:     public function getName()
208:     {
209:         return $this->name;
210:     }
211: 
212:     /**
213:      * Notes about the water profile.  May be multiline.
214:      *
215:      * @param string $notes
216:      */
217:     public function setNotes($notes)
218:     {
219:         $this->notes = $notes;
220:     }
221: 
222:     /**
223:      * Notes about the water profile.  May be multiline.
224:      *
225:      * @return string
226:      */
227:     public function getNotes()
228:     {
229:         return $this->notes;
230:     }
231: 
232:     /**
233:      * The PH of the water.
234:      *
235:      * @param float $pH
236:      */
237:     public function setPH($pH)
238:     {
239:         $this->pH = $pH;
240:     }
241: 
242:     /**
243:      * The PH of the water.
244:      *
245:      * @return float
246:      */
247:     public function getPH()
248:     {
249:         return $this->pH;
250:     }
251: 
252:     /**
253:      * The amount of Sodium (Na) in parts per million.
254:      *
255:      * @param float $sodium
256:      */
257:     public function setSodium($sodium)
258:     {
259:         $this->sodium = $sodium;
260:     }
261: 
262:     /**
263:      * The amount of Sodium (Na) in parts per million.
264:      *
265:      * @return float
266:      */
267:     public function getSodium()
268:     {
269:         return $this->sodium;
270:     }
271: 
272:     /**
273:      * The amount of Sulfate (SO4) in parts per million.
274:      *
275:      * @param float $sulfate
276:      */
277:     public function setSulfate($sulfate)
278:     {
279:         $this->sulfate = $sulfate;
280:     }
281: 
282:     /**
283:      * The amount of Sulfate (SO4) in parts per million.
284:      *
285:      * @return float
286:      */
287:     public function getSulfate()
288:     {
289:         return $this->sulfate;
290:     }
291: 
292:     /**
293:      * Version of the water record.  Should always be "1" for this version of the XML standard.
294:      *
295:      * @param int $version
296:      */
297:     public function setVersion($version)
298:     {
299:         $this->version = $version;
300:     }
301: 
302:     /**
303:      * Version of the water record.  Should always be "1" for this version of the XML standard.
304:      *
305:      * @return int
306:      */
307:     public function getVersion()
308:     {
309:         return $this->version;
310:     }
311: 
312:     /**
313:      * The amount of water in this record along with the units formatted for easy display in the current user defined
314:      * units.  For example "5.0 gal" or "20.0 l".
315:      *
316:      * @param string $displayAmount
317:      */
318:     public function setDisplayAmount($displayAmount)
319:     {
320:         $this->displayAmount = $displayAmount;
321:     }
322: 
323:     /**
324:      * The amount of water in this record along with the units formatted for easy display in the current user defined
325:      * units.  For example "5.0 gal" or "20.0 l".
326:      *
327:      * @return string
328:      */
329:     public function getDisplayAmount()
330:     {
331:         return $this->displayAmount;
332:     }
333: 
334: }
335: 
php-beerxml API documentation generated by ApiGen 2.8.0