php snippets: added __construct() snippet
This commit is contained in:
parent
88645f03ea
commit
839e3f3ebb
@ -230,6 +230,15 @@ class $1
|
|||||||
$0
|
$0
|
||||||
endsnippet
|
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"
|
snippet pr "Dumb debug helper in HTML"
|
||||||
echo '<pre>' . var_export($1, 1) . '</pre>';$0
|
echo '<pre>' . var_export($1, 1) . '</pre>';$0
|
||||||
endsnippet
|
endsnippet
|
||||||
|
Loading…
x
Reference in New Issue
Block a user