From 839e3f3ebbae4ba286bb834a4bb97612132336b8 Mon Sep 17 00:00:00 2001 From: Jan Mollowitz Date: Fri, 27 Sep 2013 16:22:51 +0200 Subject: [PATCH] php snippets: added __construct() snippet --- UltiSnips/php.snippets | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/UltiSnips/php.snippets b/UltiSnips/php.snippets index 21a0a97..c9f721b 100644 --- a/UltiSnips/php.snippets +++ b/UltiSnips/php.snippets @@ -230,6 +230,15 @@ class $1 $0 endsnippet +snippet construct "__construct()" +/** + * @param $2mixed ${1/, /\n * \@param mixed /g} + */ +public function __construct(${1:$dependencies}) {${1/\$(\w+)(, )*/\n\t$this->$1 = $$1;/g} +} +$0 +endsnippet + snippet pr "Dumb debug helper in HTML" echo '
' . var_export($1, 1) . '
';$0 endsnippet