@@ -39,23 +39,30 @@ snippet m
39
39
${7}
40
40
}
41
41
# setter method
42
- # I think vim's functions will not be called at the snipMate's runtime
43
- # but `compile` time
44
- # so `tolower` here won't work
45
- # but it would be wonderful if we could make the property and parameter to lower case
46
42
snippet sm
47
- ${1: public } function set${2: Foo } (${3: $2 } $${4: `tolower('$2 ')` } )
43
+ /**
44
+ * Sets the value of ${1: foo }
45
+ *
46
+ * @param ${2: $1 } $$1 ${3: description }
47
+ *
48
+ * @return ${4: `Filename()` }
49
+ */
50
+ ${5: public } function set${6: $2 } (${7: $2 } $$1 )
48
51
{
49
- $this->${5: $4 } = $$4 ;
50
- ${6}
52
+ $this->${8: $1 } = $$1 ;
51
53
return $this;
52
- }
54
+ }${9}
53
55
# getter method
54
56
snippet gm
55
- ${1: public } function get${2: Foo } ()
57
+ /**
58
+ * Gets the value of ${1: foo }
59
+ *
60
+ * @return ${2: $1 }
61
+ */
62
+ ${3: public } function get${4: $2 } ()
56
63
{
57
- return $this->${3 : $2 } ;
58
- }
64
+ return $this->${5 : $1 } ;
65
+ }${6}
59
66
# setter
60
67
snippet $s
61
68
${1: $foo } ->set${2: Bar } (${3} );
@@ -195,7 +202,7 @@ snippet interface
195
202
* @package ${3: default }
196
203
* @author ${4: `g:snips_author` }
197
204
*/
198
- interface ${1: }
205
+ interface ${1: `Filename()` }
199
206
{
200
207
${5}
201
208
}
@@ -204,7 +211,7 @@ snippet class
204
211
/**
205
212
* ${1}
206
213
*/
207
- class ${2: ClassName }
214
+ class ${2: `Filename()` }
208
215
{
209
216
${3}
210
217
/**
@@ -322,27 +329,29 @@ snippet http_redirect
322
329
header ("Location: ".URL);
323
330
exit();
324
331
# Getters & Setters
325
- snippet getset
332
+ snippet gs
326
333
/**
327
- * Gets the value of ${1: }
334
+ * Gets the value of ${1: foo }
328
335
*
329
- * @return ${2}
336
+ * @return ${2: $1 }
330
337
*/
331
- public function get$1 ()
338
+ public function get${3 : $2 } ()
332
339
{
333
- return $this->$1 ;
340
+ return $this->${4 : $1 } ;
334
341
}
335
342
336
343
/**
337
344
* Sets the value of $1
338
345
*
339
- * @param mixed $$1 ${3}
346
+ * @param $2 $$1 ${5: description }
347
+ *
348
+ * @return ${6: `Filename()` }
340
349
*/
341
- public function set$1 ( $$1 )
350
+ public function set$3 ( ${7 : $2 } $$1 )
342
351
{
343
- $this->$1 = $$1 ;
352
+ $this->$4 = $$1 ;
344
353
return $this;
345
- }
354
+ }${8}
346
355
snippet rett
347
356
return true;
348
357
snippet retf
0 commit comments