Skip to content

Instantly share code, notes, and snippets.

@tomasfejfar
Created October 28, 2016 20:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tomasfejfar/15d63aa053e7c148d3730de738e0ebfd to your computer and use it in GitHub Desktop.
Save tomasfejfar/15d63aa053e7c148d3730de738e0ebfd to your computer and use it in GitHub Desktop.
Complex Velocity PhpStorm file template
#set($NameLenght = $NAME.length() - 5)
#set($ClassName = $NAME.substring(0, $NameLenght))
#set($TableName = $ClassName.toLowerCase())
#set($TablePrefix = $Namespace.toLowerCase())
#set($NAMESPACE = $Namespace)
#set($TYPE_TAG = '@var')
#set($TYPE_HINT = 'string')
<?php
namespace ${Namespace};
#parse("PHP Class Doc Comment.php")
class ${ClassName}
{
#parse("PHP Field Doc Comment.php")
protected ${DS}tableName = '${TablePrefix}_${TableName}';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment