Last active
August 29, 2015 14:02
-
-
Save Sitebase/5e38920e5c2375ee006b to your computer and use it in GitHub Desktop.
Handy PHP snippets for creating getters and setters
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
<snippet> | |
<content><![CDATA[ | |
public function get${1:Property}() { | |
return \$this->${2:$property}; | |
} | |
]]></content> | |
<tabTrigger>publicget</tabTrigger> | |
<scope>source.php</scope> | |
</snippet> |
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
<snippet> | |
<content><![CDATA[ | |
public function set${1:Property}(\$${2:$property}) { | |
\$this->${2:$property} = \$${2:$property}; | |
} | |
]]></content> | |
<tabTrigger>publicset</tabTrigger> | |
<scope>source.php</scope> | |
</snippet> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment