Skip to content

Instantly share code, notes, and snippets.

@ajcastro
Last active February 7, 2019 02:04
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ajcastro/4a7b4f5c315047b92eec to your computer and use it in GitHub Desktop.
Save ajcastro/4a7b4f5c315047b92eec to your computer and use it in GitHub Desktop.
Php class declaration sublime snippet
<snippet>
<content><![CDATA[
<?php
namespace ${1:${TM_FILEPATH/(?:.*app\/)|(\/)?([^\/]+)(?=\/)|(?:\/[^\/]+\.php$)/(?1:\\$^N:$^N)/g}};
class ${2:${TM_FILENAME/(.*)[.](.*)/$1/g}} ${3:extends}
{
${4:public} function ${5:methodName}($6)
{
$7
}
}
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>class</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.php</scope> -->
</snippet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment