Last active
August 29, 2015 13:55
-
-
Save devster/8689643 to your computer and use it in GitHub Desktop.
PHP setter/getter snippet for sublime text
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[ | |
/** | |
* Set ${1:property} | |
* | |
* @param ${2:type} \$$1 | |
* | |
* @return ${3:Type} | |
*/ | |
public function set${1/^([a-z])/\u$1/g}(\$$1) | |
{ | |
\$this->$1 = \$$1; | |
return \$this; | |
} | |
/** | |
* Get $1 | |
* | |
* @return $2 | |
*/ | |
public function get${1/^([a-z])/\u$1/g}() | |
{ | |
return \$this->$1; | |
} | |
]]></content> | |
<tabTrigger>setget</tabTrigger> | |
<scope>source.php</scope> | |
<description>Setter/Getter for php class</description> | |
</snippet> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There is only one space after the
@param
tag