Skip to content

Instantly share code, notes, and snippets.

@dhrrgn
Created February 27, 2014 20:22
Show Gist options
  • Save dhrrgn/9258747 to your computer and use it in GitHub Desktop.
Save dhrrgn/9258747 to your computer and use it in GitHub Desktop.
Sublime Text Snippet for creating a Getter/Setter in PHP.
<snippet>
<content><![CDATA[
/**
* ${1:Get the Var}
*
* @return ${2:string}
*/
public function get${3:Var}()
{
return \$this->${4:var};
}
/**
* ${5:Set the Var}
*
* @param $2 \$$4 ${6:The Var}
*/
public function set$3(\$$4)
{
\$this->$4 = \$$4;
}
]]></content>
<tabTrigger>getset</tabTrigger>
<scope>source.php</scope>
</snippet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment