Skip to content

Instantly share code, notes, and snippets.

@luanpcweb
Forked from eminetto/gist:2137945
Last active August 29, 2015 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save luanpcweb/35ce97a2c04f18874605 to your computer and use it in GitHub Desktop.
Save luanpcweb/35ce97a2c04f18874605 to your computer and use it in GitHub Desktop.
<snippet>
<content><![CDATA[public function get${1/(.*)/\u$1/}()
{
return \$this->${1:$SELECTION};
}
public function set${1/(.*)/\u$1/}(\$$1)
{
return \$this->$1 = \$$1;
}
]]></content>
<!-- Optional: Tab trigger to activate the snippet -->
<tabTrigger>getset</tabTrigger>
<!-- Optional: Scope the tab trigger will be active in -->
<scope>source.php</scope>
<!-- Optional: Description to show in the menu -->
<description>Create getter and setter methods</description>
</snippet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment