Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
22 lines (19 sloc) 620 Bytes
<snippet>
<content><![CDATA[// Getter and setter for \$this->${1:$SELECTION}
public function get${1/(?:^|_)(\w)/\U$1$2/g$1}()
{
return \$this->$1;
}
public function set${1/(?:^|_)(\w)/\U$1$2/g$1}(\$${1/_(\w)/\U$1/g$1})
{
\$this->$1 = \$${1/_(\w)/\U$1/g$1};
return \$this;
}
]]></content>
<!-- Optional: Tab trigger to activate the snippet -->
<tabTrigger>gs</tabTrigger>
<!-- Optional: Scope the tab trigger will be active in -->
<scope>source.php</scope>
<!-- Optional: Description to show in the menu -->
<description>Create getter and setter methods</description>
</snippet>