diff --git a/snippets/php.snippets b/snippets/php.snippets index dd529d9..09b9152 100644 --- a/snippets/php.snippets +++ b/snippets/php.snippets @@ -352,6 +352,26 @@ snippet gs $this->$4 = $$1; return $this; }${8} +# anotation, get, and set, useful for doctrine +snippet ags + /** + * ${1:description} + * + * @ORM\Column(type="{7:string}") + */ + ${2:protected} $${3:foo}; + + public function get${4:$3}() + { + return $this->$3; + } + + public function set$4(${5:$4 }$${6:$3}) + { + $this->$3 = $$6; + + return $this; + } snippet rett return true; snippet retf