PHP SnippetsHere are some snippets to get you guys going with your PHP development in Espresso. To set these up click the + icon in the snippets panel and then click "Add Snippet". Title it with whatever you want, and choose whatever you want your tab-trigger to be. Paste the code below in to the Snippet field and then click Done. Note: - The way CodeSense is currently setup in Espresso I've been naming my tab-triggers with a prepended s, so I don't accidently complete a function name.
- Indentation doesn't work still, but that's a problem with Espresso. These snippets work best work flush against the left hand side.
- I didn't make separate doc snippets, but rather the initial selection is the entire PHPDoc comment, so you can delete it if you don't want it, or make your own snippets with the provided templates.
Classsuggested tab-trigger: sclass ${1:/**
* ${2:className}
*
* ${3:class description}
*
* @author ${4:your name}
*/}
${5:${6:abstract }class ${7:${2:ClassName}}${8: ${9:extends${10: ExtendedClassName}}${11: implements${12: ImplementedClassName}}}}
{
${13:booyah}
}Functionsuggested tab-trigger: sfun ${1:/**
* ${2:function description}
*
${3: * @author ${4:your name}}
${5: * @param \$${6:param}}
* @return ${7:return type}
*/}
${8:static|public|protected|private }function ${9:functionName}(\$${10:${6}})
{
${11:booyah}
}Variablesuggested tab-trigger: svar ${1:/**
* ${2:variable description}
*
* @var ${3:variable type}
*/}
${4:static|public|protected|private }\$${5:variableName}${6: = ${7:null};}
|