From dce86f7f34d3255cbf905fe711b299dedf5716af Mon Sep 17 00:00:00 2001 From: rrooij Date: Sat, 7 Apr 2018 19:02:53 +0200 Subject: [PATCH] php-mode: add getter and setter snippets --- snippets/php-mode/get | 10 ++++++++++ snippets/php-mode/set | 10 ++++++++++ 2 files changed, 20 insertions(+) create mode 100644 snippets/php-mode/get create mode 100644 snippets/php-mode/set diff --git a/snippets/php-mode/get b/snippets/php-mode/get new file mode 100644 index 000000000..b97d4c3fd --- /dev/null +++ b/snippets/php-mode/get @@ -0,0 +1,10 @@ +# -*- mode: snippet -*- +# contributor: Robin de Rooij +# name: get +# key: get +# group: definitions +# -- +public function get${1:$(capitalize yas-text)}() +{ + return \$this->$1; +} \ No newline at end of file diff --git a/snippets/php-mode/set b/snippets/php-mode/set new file mode 100644 index 000000000..60e2211dc --- /dev/null +++ b/snippets/php-mode/set @@ -0,0 +1,10 @@ +# -*- mode: snippet -*- +# contributor: Robin de Rooij +# name: set +# key: set +# group: definitions +# -- +public function set${1:$(capitalize yas-text)}(\$$1) +{ + \$this->$1 = $1; +} \ No newline at end of file