php: Bug fixes for php by Ye Yen.

This commit is contained in:
Holger Rapp 2013-11-09 17:07:08 +01:00
parent 6ad9a396dd
commit 1600f5bbea

View File

@ -117,22 +117,20 @@ $0
endsnippet
snippet gs "PHP Class Getter Setter" !b
protected $$1
/*
* Getter for $1
* Getter for ${1/(\w+)\s*;/$1/}
*/
public function get${1/\w+\s*/\u$0/}()
public function get${1/(\w+)\s*;/\u$1/}()
{
return $this->$1;$2
return $this->${1/(\w+)\s*;/$1/};$2
}
/*
* Setter for $1
* Setter for ${1/(\w+)\s*;/$1/}
*/
public function set${1/\w+\s*/\u$0/}($$1)
public function set${1/(\w+)\s*;/\u$1/}($${1/(\w+)\s*;/$1/})
{
$this->$1 = $$1;$3
$this->${1/(\w+)\s*;/$1/} = $${1/(\w+)\s*;/$1/};$3
${4:return $this;}
}
$0
@ -261,4 +259,3 @@ public function $1Action($2)
endsnippet
# :vim:ft=snippets: