order removed $options load from contruct
This commit is contained in:
parent
74bd536002
commit
41d50aff77
@ -93,6 +93,28 @@ snippet var "var"
|
||||
var_export(${1});${2}
|
||||
endsnippet
|
||||
|
||||
snippet getter "PHP Class Getter" !b
|
||||
/*
|
||||
* Getter for $1
|
||||
*/
|
||||
public function get${1/\w+\s*/\u$0/}()
|
||||
{
|
||||
return $this->$1;$2
|
||||
}
|
||||
$4
|
||||
endsnippet
|
||||
|
||||
snippet setter "PHP Class Setter" !b
|
||||
/*
|
||||
* Setter for $1
|
||||
*/
|
||||
public function set${1/\w+\s*/\u$0/}($$1)
|
||||
{
|
||||
$this->$1 = $$1;$3
|
||||
return $this;
|
||||
}
|
||||
$4
|
||||
endsnippet
|
||||
|
||||
snippet gs "PHP Class Getter Setter" !b
|
||||
protected $$1
|
||||
@ -113,7 +135,7 @@ public function set${1/\w+\s*/\u$0/}($$1)
|
||||
$this->$1 = $$1;$3
|
||||
return $this;
|
||||
}
|
||||
$0
|
||||
$4
|
||||
endsnippet
|
||||
|
||||
snippet pub "Public function" !b
|
||||
@ -126,7 +148,6 @@ endsnippet
|
||||
snippet pro "Protected function" !b
|
||||
protected function ${1:name}(${2:$param})
|
||||
{
|
||||
|
||||
${3:return null;}
|
||||
}
|
||||
endsnippet
|
||||
@ -190,17 +211,14 @@ endsnippet
|
||||
|
||||
snippet class "Class declaration template" !b
|
||||
/**
|
||||
* @author Jacek Wysocki <jacek.wysocki@gmail.com>
|
||||
* Class ${1:`!p snip.rv=snip.fn.capitalize().split('.')[0]`}
|
||||
* @author $2
|
||||
*/
|
||||
class ${1:`!p snip.rv=snip.fn.capitalize().split('.')[0]`}
|
||||
class $1
|
||||
{
|
||||
public function __construct(${2:$options=array()})
|
||||
public function __construct(${3:$options=array()})
|
||||
{
|
||||
${3:if (is_array($options)) {
|
||||
foreach ($options as $k => $v) {
|
||||
$this->$k = $v;
|
||||
}
|
||||
}}$4
|
||||
${4:// code}$5
|
||||
}
|
||||
}
|
||||
endsnippet
|
||||
|
Loading…
x
Reference in New Issue
Block a user