1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Spatie\SchemaOrg; |
4
|
|
|
|
5
|
|
|
/** |
6
|
|
|
* A recipe. For dietary restrictions covered by the recipe, a few common |
7
|
|
|
* restrictions are enumerated via [[suitableForDiet]]. The [[keywords]] |
8
|
|
|
* property can also be used to add more detail. |
9
|
|
|
* |
10
|
|
|
* @see http://schema.org/Recipe |
11
|
|
|
*/ |
12
|
|
|
class Recipe extends HowTo |
13
|
|
|
{ |
14
|
|
|
/** |
15
|
|
|
* The time it takes to actually cook the dish, in [ISO 8601 duration |
16
|
|
|
* format](http://en.wikipedia.org/wiki/ISO_8601). |
17
|
|
|
* |
18
|
|
|
* @param Duration|Duration[] $cookTime |
19
|
|
|
* |
20
|
|
|
* @return static |
21
|
|
|
* |
22
|
|
|
* @see http://schema.org/cookTime |
23
|
|
|
*/ |
24
|
|
|
public function cookTime($cookTime) |
25
|
|
|
{ |
26
|
|
|
return $this->setProperty('cookTime', $cookTime); |
27
|
|
|
} |
28
|
|
|
|
29
|
|
|
/** |
30
|
|
|
* The method of cooking, such as Frying, Steaming, ... |
31
|
|
|
* |
32
|
|
|
* @param string|string[] $cookingMethod |
33
|
|
|
* |
34
|
|
|
* @return static |
35
|
|
|
* |
36
|
|
|
* @see http://schema.org/cookingMethod |
37
|
|
|
*/ |
38
|
|
|
public function cookingMethod($cookingMethod) |
39
|
|
|
{ |
40
|
|
|
return $this->setProperty('cookingMethod', $cookingMethod); |
41
|
|
|
} |
42
|
|
|
|
43
|
|
|
/** |
44
|
|
|
* A single ingredient used in the recipe, e.g. sugar, flour or garlic. |
45
|
|
|
* |
46
|
|
|
* @param string|string[] $ingredients |
47
|
|
|
* |
48
|
|
|
* @return static |
49
|
|
|
* |
50
|
|
|
* @see http://schema.org/ingredients |
51
|
|
|
*/ |
52
|
|
|
public function ingredients($ingredients) |
53
|
|
|
{ |
54
|
|
|
return $this->setProperty('ingredients', $ingredients); |
55
|
|
|
} |
56
|
|
|
|
57
|
|
|
/** |
58
|
|
|
* Nutrition information about the recipe or menu item. |
59
|
|
|
* |
60
|
|
|
* @param NutritionInformation|NutritionInformation[] $nutrition |
61
|
|
|
* |
62
|
|
|
* @return static |
63
|
|
|
* |
64
|
|
|
* @see http://schema.org/nutrition |
65
|
|
|
*/ |
66
|
|
|
public function nutrition($nutrition) |
67
|
|
|
{ |
68
|
|
|
return $this->setProperty('nutrition', $nutrition); |
69
|
|
|
} |
70
|
|
|
|
71
|
|
|
/** |
72
|
|
|
* The category of the recipe—for example, appetizer, entree, etc. |
73
|
|
|
* |
74
|
|
|
* @param string|string[] $recipeCategory |
75
|
|
|
* |
76
|
|
|
* @return static |
77
|
|
|
* |
78
|
|
|
* @see http://schema.org/recipeCategory |
79
|
|
|
*/ |
80
|
|
|
public function recipeCategory($recipeCategory) |
81
|
|
|
{ |
82
|
|
|
return $this->setProperty('recipeCategory', $recipeCategory); |
83
|
|
|
} |
84
|
|
|
|
85
|
|
|
/** |
86
|
|
|
* The cuisine of the recipe (for example, French or Ethiopian). |
87
|
|
|
* |
88
|
|
|
* @param string|string[] $recipeCuisine |
89
|
|
|
* |
90
|
|
|
* @return static |
91
|
|
|
* |
92
|
|
|
* @see http://schema.org/recipeCuisine |
93
|
|
|
*/ |
94
|
|
|
public function recipeCuisine($recipeCuisine) |
95
|
|
|
{ |
96
|
|
|
return $this->setProperty('recipeCuisine', $recipeCuisine); |
97
|
|
|
} |
98
|
|
|
|
99
|
|
|
/** |
100
|
|
|
* A single ingredient used in the recipe, e.g. sugar, flour or garlic. |
101
|
|
|
* |
102
|
|
|
* @param string|string[] $recipeIngredient |
103
|
|
|
* |
104
|
|
|
* @return static |
105
|
|
|
* |
106
|
|
|
* @see http://schema.org/recipeIngredient |
107
|
|
|
*/ |
108
|
|
|
public function recipeIngredient($recipeIngredient) |
109
|
|
|
{ |
110
|
|
|
return $this->setProperty('recipeIngredient', $recipeIngredient); |
111
|
|
|
} |
112
|
|
|
|
113
|
|
|
/** |
114
|
|
|
* A step in making the recipe, in the form of a single item (document, |
115
|
|
|
* video, etc.) or an ordered list with HowToStep and/or HowToSection items. |
116
|
|
|
* |
117
|
|
|
* @param CreativeWork|CreativeWork[]|ItemList|ItemList[]|string|string[] $recipeInstructions |
118
|
|
|
* |
119
|
|
|
* @return static |
120
|
|
|
* |
121
|
|
|
* @see http://schema.org/recipeInstructions |
122
|
|
|
*/ |
123
|
|
|
public function recipeInstructions($recipeInstructions) |
124
|
|
|
{ |
125
|
|
|
return $this->setProperty('recipeInstructions', $recipeInstructions); |
126
|
|
|
} |
127
|
|
|
|
128
|
|
|
/** |
129
|
|
|
* The quantity produced by the recipe (for example, number of people |
130
|
|
|
* served, number of servings, etc). |
131
|
|
|
* |
132
|
|
|
* @param QuantitativeValue|QuantitativeValue[]|string|string[] $recipeYield |
133
|
|
|
* |
134
|
|
|
* @return static |
135
|
|
|
* |
136
|
|
|
* @see http://schema.org/recipeYield |
137
|
|
|
*/ |
138
|
|
|
public function recipeYield($recipeYield) |
139
|
|
|
{ |
140
|
|
|
return $this->setProperty('recipeYield', $recipeYield); |
141
|
|
|
} |
142
|
|
|
|
143
|
|
|
/** |
144
|
|
|
* Indicates a dietary restriction or guideline for which this recipe or |
145
|
|
|
* menu item is suitable, e.g. diabetic, halal etc. |
146
|
|
|
* |
147
|
|
|
* @param RestrictedDiet|RestrictedDiet[] $suitableForDiet |
148
|
|
|
* |
149
|
|
|
* @return static |
150
|
|
|
* |
151
|
|
|
* @see http://schema.org/suitableForDiet |
152
|
|
|
*/ |
153
|
|
|
public function suitableForDiet($suitableForDiet) |
154
|
|
|
{ |
155
|
|
|
return $this->setProperty('suitableForDiet', $suitableForDiet); |
156
|
|
|
} |
157
|
|
|
|
158
|
|
|
} |
159
|
|
|
|