Created
April 16, 2014 17:41
-
-
Save marknotfound/10912126 to your computer and use it in GitHub Desktop.
Generate setter and getter methods for a PHP member variable.
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[ | |
/** | |
* @return ${1:type} | |
*/ | |
${2:visibility} function get${3:Name}() { | |
return \$this->${5:property}; | |
} // get${3:Name} | |
/** | |
* @param ${1:type} ${4:arg} | |
*/ | |
${2:visibility} function set${3:Name}( ${4:arg} ) { | |
\$this->${5:property} = ${4:arg}; | |
} // set${3:Name} | |
]]></content> | |
<!-- Optional: Set a tabTrigger to define how to trigger the snippet --> | |
<tabTrigger>synthesize</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