1: <?php
2:
3:
4: namespace BeerXML\Generator;
5:
6: /**
7: * Interface for classes that want to implement getters for Recipe Records.
8: *
9: * These can be used with the Generator to parse into an object implementing this interface
10: *
11: * @package BeerXML\Generator
12: */
13: interface IRecipe
14: {
15: /**
16: * The time to age the beer in days after bottling.
17: *
18: * @return number Time (days)
19: */
20: public function getAge();
21:
22: /**
23: * Temperature for aging the beer after bottling.
24: *
25: * @return number Temperature C
26: */
27: public function getAgeTemp();
28:
29: /**
30: * Optional name of the assistant brewer
31: *
32: * @return string
33: */
34: public function getAsstBrewer();
35:
36: /**
37: * Target size of the finished batch in liters.
38: *
39: * @return float Volume (liters)
40: */
41: public function getBatchSize();
42:
43: /**
44: * Starting size for the main boil of the wort in liters.
45: *
46: * @return float Volume (liters)
47: */
48: public function getBoilSize();
49:
50: /**
51: * The total time to boil the wort in minutes.
52: *
53: * @return number Time in minutes
54: */
55: public function getBoilTime();
56:
57: /**
58: * Name of the brewer
59: *
60: * @return string
61: */
62: public function getBrewer();
63:
64: /**
65: * Floating point value corresponding to the target volumes of CO2 used to carbonate this beer.
66: *
67: * @return float Volumes of CO2
68: */
69: public function getCarbonation();
70:
71: /**
72: * The temperature for either bottling or forced carbonation.
73: *
74: * @return number Temperature (degrees C)
75: */
76: public function getCarbonationTemp();
77:
78: /**
79: * Date brewed in a easily recognizable format such as "3 Dec 04".
80: *
81: * @return \DateTime
82: */
83: public function getDate();
84:
85: /**
86: * The percent brewhouse efficiency to be used for estimating the starting gravity of the beer.
87: *
88: * Not required for "Extract" recipes, but is required for "Partial Mash" and "All Grain" recipes.
89: *
90: * @return float (e.g. 72.3)
91: */
92: public function getEfficiency();
93:
94: /**
95: * An equipment record is optional.
96: *
97: * If included the BATCH_SIZE and BOIL_SIZE in the equipment record must match the values in this recipe record.
98: *
99: * @return IEquipment
100: */
101: public function getEquipment();
102:
103: /**
104: * Zero or more FERMENTABLE ingredients may appear between the <FERMENTABLES> … </FERMENTABLES> tags.
105: *
106: * @return IFermentable[]
107: */
108: public function getFermentables();
109:
110: /**
111: * The number of fermentation stages used – typically a number between one and three
112: *
113: * @return int
114: */
115: public function getFermentationStages();
116:
117: /**
118: * The measured final gravity of the finished beer.
119: *
120: * @return float Specific Gravity
121: */
122: public function getFg();
123:
124: /**
125: * TRUE if the batch was force carbonated using CO2 pressure, FALSE if the batch was carbonated using a priming
126: * agent.
127: *
128: * Default is FALSE
129: *
130: * @return boolean
131: */
132: public function getForcedCarbonation();
133:
134: /**
135: * Zero or more HOP ingredient records may appear between the <HOPS>…</HOPS> tags.
136: *
137: * @return IHop[]
138: */
139: public function getHops();
140:
141: /**
142: * Used to factor in the smaller amount of sugar needed for large containers.
143: *
144: * For example, this might be 0.5 for a typical 5 gallon keg since naturally priming a keg requires about 50% as
145: * much sugar as priming bottles.
146: *
147: * @return float
148: */
149: public function getKegPrimingFactor();
150:
151: /**
152: * A MASH profile record containing one or more MASH_STEPs.
153: *
154: * NOTE: No Mash record is needed for "Extract" type brews.
155: *
156: * @return IMashProfile
157: */
158: public function getMash();
159:
160: /**
161: * Zero or more MISC records may appear between <MISCS> … </MISCS>
162: *
163: * @return IMisc[]
164: */
165: public function getMiscs();
166:
167: /**
168: * Name of the recipe.
169: *
170: * @return string
171: */
172: public function getName();
173:
174: /**
175: * Notes associated with this recipe – may be multiline.
176: *
177: * @return string
178: */
179: public function getNotes();
180:
181: /**
182: * The measured original (pre-fermentation) specific gravity of the beer.
183: *
184: * @return float Specific Gravity
185: */
186: public function getOg();
187:
188: /**
189: * Time spent in the primary in days
190: *
191: * @return number Time (days)
192: */
193: public function getPrimaryAge();
194:
195: /**
196: * Temperature in degrees Celsius for the primary fermentation.
197: *
198: * @return number Temperature C
199: */
200: public function getPrimaryTemp();
201:
202: /**
203: * Factor used to convert this priming agent to an equivalent amount of corn sugar for a bottled scenario.
204: *
205: * For example, "Dry Malt Extract" would have a value of 1.4 because it requires 1.4 times as much DME as corn sugar
206: * to carbonate. To calculate the amount of DME needed, the program can calculate the amount of corn sugar needed
207: * and then multiply by this factor.
208: *
209: * @return float
210: */
211: public function getPrimingSugarEquiv();
212:
213: /**
214: * Text describing the priming agent such as "Honey" or "Corn Sugar" – used only if this is not a forced carbonation
215: *
216: * @return string
217: */
218: public function getPrimingSugarName();
219:
220: /**
221: * Time spent in the secondary in days
222: *
223: * @return number Time (days)
224: */
225: public function getSecondaryAge();
226:
227: /**
228: * Temperature in degrees Celsius for the secondary fermentation.
229: *
230: * @return number Temperature (C )
231: */
232: public function getSecondaryTemp();
233:
234: /**
235: * The style of the beer this recipe is associated with. All of the required items for a valid style should be
236: * between the <STYLE>…</STYLE> tags.
237: *
238: * @return \BeerXML\Record\Style
239: */
240: public function getStyle();
241:
242: /**
243: * Tasting notes – may be multiline.
244: *
245: * @return string
246: */
247: public function getTasteNotes();
248:
249: /**
250: * Number between zero and 50.0 denoting the taste rating – corresponds to the 50 point BJCP rating system.
251: *
252: * @return float
253: */
254: public function getTasteRating();
255:
256: /**
257: * Time spent in the third fermenter in days.
258: *
259: * @return number Time (days)
260: */
261: public function getTertiaryAge();
262:
263: /**
264: * Temperature in the tertiary fermenter.
265: *
266: * @return number Temperature C
267: */
268: public function getTertiaryTemp();
269:
270: /**
271: * May be one of "Extract", "Partial Mash" or "All Grain"
272: *
273: * @return string
274: */
275: public function getType();
276:
277: /**
278: * Version of the recipe record. Should always be "1" for this version of the XML standard.
279: *
280: * @return int
281: */
282: public function getVersion();
283:
284: /**
285: * Zero or more WATER records may appear between <WATERS> … </WATERS>
286: *
287: * @return IWater[]
288: */
289: public function getWaters();
290:
291: /**
292: * Zero or more YEAST records may appear between <YEASTS> … </YEASTS>
293: *
294: * @return IYeast[]
295: */
296: public function getYeasts();
297: }