質問編集履歴
2
user削除
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,200 +1,6 @@
|
|
1
1
|
symfony2.3です
|
2
2
|
|
3
3
|
|
4
|
-
|
5
|
-
src/Acme/HelloBundle/Entity/User.php
|
6
|
-
|
7
|
-
```ここに言語を入力
|
8
|
-
|
9
|
-
<?php
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
namespace Acme\HelloBundle\Entity;
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
use Doctrine\ORM\Mapping as ORM;
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
/**
|
22
|
-
|
23
|
-
* User
|
24
|
-
|
25
|
-
*
|
26
|
-
|
27
|
-
* @ORM\Table(name="users")
|
28
|
-
|
29
|
-
* @ORM\Entity
|
30
|
-
|
31
|
-
*/
|
32
|
-
|
33
|
-
class User
|
34
|
-
|
35
|
-
{
|
36
|
-
|
37
|
-
/**
|
38
|
-
|
39
|
-
* @var integer
|
40
|
-
|
41
|
-
*
|
42
|
-
|
43
|
-
* @ORM\Column(name="id", type="integer")
|
44
|
-
|
45
|
-
* @ORM\Id
|
46
|
-
|
47
|
-
* @ORM\GeneratedValue(strategy="AUTO")
|
48
|
-
|
49
|
-
*/
|
50
|
-
|
51
|
-
private $id;
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
/**
|
56
|
-
|
57
|
-
* @var string
|
58
|
-
|
59
|
-
*
|
60
|
-
|
61
|
-
* @ORM\Column(name="name", type="string", length=255)
|
62
|
-
|
63
|
-
*/
|
64
|
-
|
65
|
-
private $name;
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
/**
|
70
|
-
|
71
|
-
* @var string
|
72
|
-
|
73
|
-
*
|
74
|
-
|
75
|
-
* @ORM\Column(name="description", type="text")
|
76
|
-
|
77
|
-
*/
|
78
|
-
|
79
|
-
private $description;
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
/**
|
86
|
-
|
87
|
-
* Get id
|
88
|
-
|
89
|
-
*
|
90
|
-
|
91
|
-
* @return integer
|
92
|
-
|
93
|
-
*/
|
94
|
-
|
95
|
-
public function getId()
|
96
|
-
|
97
|
-
{
|
98
|
-
|
99
|
-
return $this->id;
|
100
|
-
|
101
|
-
}
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
/**
|
106
|
-
|
107
|
-
* Set name
|
108
|
-
|
109
|
-
*
|
110
|
-
|
111
|
-
* @param string $name
|
112
|
-
|
113
|
-
* @return User
|
114
|
-
|
115
|
-
*/
|
116
|
-
|
117
|
-
public function setName($name)
|
118
|
-
|
119
|
-
{
|
120
|
-
|
121
|
-
$this->name = $name;
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
return $this;
|
126
|
-
|
127
|
-
}
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
/**
|
132
|
-
|
133
|
-
* Get name
|
134
|
-
|
135
|
-
*
|
136
|
-
|
137
|
-
* @return string
|
138
|
-
|
139
|
-
*/
|
140
|
-
|
141
|
-
public function getName()
|
142
|
-
|
143
|
-
{
|
144
|
-
|
145
|
-
return $this->name;
|
146
|
-
|
147
|
-
}
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
/**
|
152
|
-
|
153
|
-
* Set description
|
154
|
-
|
155
|
-
*
|
156
|
-
|
157
|
-
* @param string $description
|
158
|
-
|
159
|
-
* @return User
|
160
|
-
|
161
|
-
*/
|
162
|
-
|
163
|
-
public function setDescription($description)
|
164
|
-
|
165
|
-
{
|
166
|
-
|
167
|
-
$this->description = $description;
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
return $this;
|
172
|
-
|
173
|
-
}
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
/**
|
178
|
-
|
179
|
-
* Get description
|
180
|
-
|
181
|
-
*
|
182
|
-
|
183
|
-
* @return string
|
184
|
-
|
185
|
-
*/
|
186
|
-
|
187
|
-
public function getDescription()
|
188
|
-
|
189
|
-
{
|
190
|
-
|
191
|
-
return $this->description;
|
192
|
-
|
193
|
-
}
|
194
|
-
|
195
|
-
}
|
196
|
-
|
197
|
-
```
|
198
4
|
|
199
5
|
src/Acme/HelloBundle/Controller/DefaultController.php
|
200
6
|
|
1
symふぉny2
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
useを使ってEntityにアクセスしたい
|
1
|
+
Symfony2でuseを使ってEntityにアクセスしたい
|
test
CHANGED
File without changes
|