1 | <?php |
||
7 | abstract class Media |
||
|
|||
8 | { |
||
9 | |||
10 | /** |
||
11 | * |
||
12 | * @var int |
||
13 | */ |
||
14 | protected $id; |
||
15 | |||
16 | /** |
||
17 | * |
||
18 | * @var File |
||
19 | */ |
||
20 | protected $file; |
||
21 | |||
22 | /** |
||
23 | * |
||
24 | * @var string |
||
25 | */ |
||
26 | protected $filename; |
||
27 | |||
28 | /** |
||
29 | * |
||
30 | * @var string |
||
31 | */ |
||
32 | protected $format; |
||
33 | |||
34 | /** |
||
35 | * |
||
36 | * @var array |
||
37 | */ |
||
38 | protected $metadata; |
||
39 | |||
40 | /** |
||
41 | * |
||
42 | * @var \DateTime |
||
43 | */ |
||
44 | protected $updatedAt; |
||
45 | |||
46 | /** |
||
47 | * |
||
48 | * @var \DateTime |
||
49 | */ |
||
50 | protected $createdAt; |
||
51 | |||
52 | /** |
||
53 | * |
||
54 | * @return string |
||
55 | */ |
||
56 | public function __toString() |
||
60 | |||
61 | /** |
||
62 | * |
||
63 | * @return int |
||
64 | */ |
||
65 | public function getId() |
||
69 | |||
70 | /** |
||
71 | * |
||
72 | * @param File $file |
||
73 | * |
||
74 | * @return $this |
||
75 | */ |
||
76 | public function setFile(File $file) |
||
82 | |||
83 | /** |
||
84 | * |
||
85 | * @return File |
||
86 | */ |
||
87 | public function getFile() |
||
91 | |||
92 | public function preUpdate() |
||
96 | |||
97 | public function prePersist() |
||
102 | |||
103 | /** |
||
104 | * Set filename |
||
105 | * |
||
106 | * @param string $filename |
||
107 | * |
||
108 | * @return Media |
||
109 | */ |
||
110 | public function setFilename($filename) |
||
116 | |||
117 | /** |
||
118 | * Get filename |
||
119 | * |
||
120 | * @return string |
||
121 | */ |
||
122 | public function getFilename() |
||
126 | |||
127 | /** |
||
128 | * Set format |
||
129 | * |
||
130 | * @param string $format |
||
131 | * |
||
132 | * @return Media |
||
133 | */ |
||
134 | public function setFormat($format) |
||
140 | |||
141 | /** |
||
142 | * Get format |
||
143 | * |
||
144 | * @return string |
||
145 | */ |
||
146 | public function getFormat() |
||
150 | |||
151 | /** |
||
152 | * Set metadata |
||
153 | * |
||
154 | * @param array $metadata |
||
155 | * |
||
156 | * @return Media |
||
157 | */ |
||
158 | public function setMetadata($metadata) |
||
164 | |||
165 | /** |
||
166 | * Get metadata |
||
167 | * |
||
168 | * @return array |
||
169 | */ |
||
170 | public function getMetadata() |
||
174 | |||
175 | /** |
||
176 | * Set updatedAt |
||
177 | * |
||
178 | * @param \DateTime $updatedAt |
||
179 | * |
||
180 | * @return Media |
||
181 | */ |
||
182 | public function setUpdatedAt($updatedAt) |
||
188 | |||
189 | /** |
||
190 | * Get updatedAt |
||
191 | * |
||
192 | * @return \DateTime |
||
193 | */ |
||
194 | public function getUpdatedAt() |
||
198 | |||
199 | /** |
||
200 | * Set createdAt |
||
201 | * |
||
202 | * @param \DateTime $createdAt |
||
203 | * |
||
204 | * @return Media |
||
205 | */ |
||
206 | public function setCreatedAt($createdAt) |
||
212 | |||
213 | /** |
||
214 | * Get createdAt |
||
215 | * |
||
216 | * @return \DateTime |
||
217 | */ |
||
218 | public function getCreatedAt() |
||
222 | |||
223 | } |
||
224 |
This check examines a number of code elements and verifies that they conform to the given naming conventions.
You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.