Last active
December 19, 2015 02:49
-
-
Save jimmylatreille/5886144 to your computer and use it in GitHub Desktop.
Snippet getter setter PHP MVC sublime text 2
This file contains 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
<snippet> | |
<content><![CDATA[ | |
//Getter ${1:val} | |
public function get${1/(?:^|_)(\w)/\U$1$2/g$1}(){ | |
return \$this->${1:val}; | |
} | |
//Setter ${1:val} | |
public function set${1/(?:^|_)(\w)/\U$1$2/g$1}(\$${1:val}){ | |
\$this->${1:val} = \$${1:val}; | |
} | |
]]></content> | |
<!-- Optional: Set a tabTrigger to define how to trigger the snippet --> | |
<tabTrigger>pSetGet</tabTrigger> | |
<!-- Optional: Set a scope to limit where the snippet will trigger --> | |
<scope>source.php</scope> | |
</snippet> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment