文章
sublime 快速设置getter and setter
分类:javascript

新建snippet,添加如下代码:
<span style="color: rgb(0, 176, 240);"><snippet><br/> <content><![CDATA[public function get${1/(.*)/\u$1/}()<br/>{<br/> return \$this->${1:$SELECTION};<br/>}<br/><br/>public function set${1/(.*)/\u$1/}(\$$1)<br/>{<br/> \$this->$1 = \$$1;<br/> return \$this;<br/>}<br/>]]></content><br/> <!-- Optional: Tab trigger to activate the snippet --><br/> <tabTrigger>getset</tabTrigger><br/> <!-- Optional: Scope the tab trigger will be active in --><br/> <scope>source.php</scope><br/> <!-- Optional: Description to show in the menu --><br/> <description>Create getter and setter methods</description><br/></snippet></span><br/>

