Last active
March 4, 2016 15:02
-
-
Save fernandovaller/41e2c031b1799803a8f2 to your computer and use it in GitHub Desktop.
Geração automática dos gets e sets de clases
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Tools > New Snippet | |
Troque o texto por esse e salve: | |
<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