Skip to content

Commit 4bbe565

Browse files
rrooijAndreaCrotti
authored andcommitted
php-mode: add getter and setter snippets (#265)
1 parent 66031e5 commit 4bbe565

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

snippets/php-mode/get

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# -*- mode: snippet -*-
2+
# contributor: Robin de Rooij <[email protected]>
3+
# name: get
4+
# key: get
5+
# group: definitions
6+
# --
7+
public function get${1:$(capitalize yas-text)}()
8+
{
9+
return \$this->$1;
10+
}

snippets/php-mode/set

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# -*- mode: snippet -*-
2+
# contributor: Robin de Rooij <[email protected]>
3+
# name: set
4+
# key: set
5+
# group: definitions
6+
# --
7+
public function set${1:$(capitalize yas-text)}(\$$1)
8+
{
9+
\$this->$1 = $1;
10+
}

0 commit comments

Comments
 (0)