-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathactions.php
More file actions
111 lines (109 loc) · 2.62 KB
/
actions.php
File metadata and controls
111 lines (109 loc) · 2.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
<?php
/**
* @return array
*/
function getDishes()
{
return [
[
"id" => 1,
"name" => "Pizza",
"kitchen" => "Italian",
],
[
"id" => 2,
"name" => "Pancake",
"kitchen" => "Dutch",
],
[
"id" => 3,
"name" => "Hotdog",
"kitchen" => "American",
],
[
"id" => 4,
"name" => "Doner Kebab",
"kitchen" => "Turkish",
],
[
"id" => 5,
"name" => "Chickenwings",
"kitchen" => "American",
],
[
"id" => 6,
"name" => "Spaghetti",
"kitchen" => "Italian",
],
[
"id" => 7,
"name" => "Soup",
"kitchen" => "French",
],
[
"id" => 8,
"name" => "Hamburger",
"kitchen" => "American",
],
[
"id" => 9,
"name" => "Meatball",
"kitchen" => "Sweden"
],
[
"id" => 10,
"name" => "Sandwich",
"kitchen" => "English",
]
];
}
/**
* @param $id
* @return mixed
*/
function getDishDetails($id)
{
$tags = [
1 => [
"recipe" => "Put it in the oven and go!",
"tags" => ['cheese', ' oven']
],
2 => [
"recipe" => "I hear the children cheering!",
"tags" => ['easy', ' better with extra stuff']
],
3 => [
"recipe" => "Make it yourself or get it from your local hotdog stand!",
"tags" => ['unox', ' meat', ' easy']
],
4 => [
"recipe" => "Everytime in the city after midnight",
"tags" => ['kapsalon', ' tasty', ' meat']
],
5 => [
"recipe" => "Fresh out of the oven.",
"tags" => ['meat', ' easy', ' better with extra stuff']
],
6 => [
"recipe" => "Even better with number 9",
"tags" => ['cheese', ' meat']
],
7 => [
"recipe" => "Unox is a great solution to all your soup problems",
"tags" => ['unox', ' easy']
],
8 => [
"recipe" => "A sandwich with some cooked meat",
"tags" => ['easy', ' meat', ' cheese']
],
9 => [
"recipe" => "Just meat...",
"tags" => ['meat', ' easy']
],
10 => [
"recipe" => "Get is from your local SubWay",
"tags" => ['meat', ' cheese', ' easy']
],
];
return $tags[$id];
}