Php + Yii code templates for NetBeans Cheat Sheet by hoplayann
Comments
|
Add a Comment
|
PDF Download
|
Find:
Yii model methods
| yafterconstruct |
| yafterdelete |
| yafterfind |
| yaftersave |
| yaftervalidate |
| yattributelabels |
| ybeforedelete |
| ybeforefind |
| ybeforesave |
| ybeforevalidate |
| ybehaviors |
| ydefaultscope |
| yrelations |
| yrules |
| yscope |
| yscopes |
| yvalidator |
Yii controller methods
| yaccessrules |
| yaction |
| yactions |
| yafteraction |
| yafterrender |
| ybeforeaction |
| ybeforerender |
| ybehaviors |
| yfilters |
Yii function calls
| ya |
Yii::app() |
| ybu |
Yii::app()->baseUrl |
| yca |
Yii::app()->user->checkAccess() |
| yd |
CVarDumper::dump() |
| ym |
${modelClass}::model() |
| yt |
Yii::t() |
| yu |
Yii::app()->user |
| yurl |
Yii::app()->createUrl() |
| |
Yii view templates
| ybeginwidget |
$this->beginWidget |
| ybu |
Yii::app()->baseUrl |
| ywidget |
$this->widget(...) |
Php print data
| eco |
echo(“${message}”); ${cursor} |
| pr |
print ${VARIABLE variableFromPreviousAssignment default="$variable"}; ${cursor} |
| prln |
print ${VARIABLE variableFromPreviousAssignment default="$variable"}."\n"; ${cursor} |
| prs |
print "${cursor}"; |
| prv |
print "\${VARIABLE variableFromPreviousAssignment default="$variable"} = ".${VARIABLE editable=false}."\n"; ${cursor} |
Php generics
| cls |
class ${ClassName} { function ${__construct}() { ${selection}${cursor} } } |
| fnc |
function ${functionName}($$${param}) { ${selection}${cursor} } |
| iface |
interface ${InterfaceName} { ${cursor} } |
| ifnc |
public function ${functionName}($$${param}); |
| pcon |
parent::__construct(); ${cursor} |
| thr |
throw new ${Exception}; |
| tryc |
try { ${selection}${cursor} } catch (${Exception} $$${exc}) { echo $$${exc editable=false}->getTraceAsString(); } |
| vdoc |
/ @var $$${VARIABLE variableFromNextAssignmentName default="variable"} ${VAR_TYPE variableFromNextAssignmentType default="ClassName"} / |
| |
Php statements
| do |
do { ${selection}${cursor} } while (${CONDITION variableFromPreviousAssignment instanceof="boolean" default="true"}); |
| elif |
elseif (${CONDITION variableFromPreviousAssignment instanceof="boolean" default="true"}) { ${selection}${cursor} } |
| els |
else { ${selection}${cursor} } |
| fore |
foreach (${ARRAY variableFromPreviousAssignment instanceof="array" default="$array"} as $$${value}) { ${selection}${cursor} } |
| if |
if (${CONDITION variableFromPreviousAssignment instanceof="boolean" default="true"}) { ${selection}${cursor} } |
| inst |
if (${VARIABLE variableFromPreviousAssignment default="$variable"} instanceof ${ClassName}) { ${selection}${cursor} } |
| itdir |
$$${DIRH newVarName default="dirh"} = opendir(${$dirname}); if ($$${DIRH editable=false}) { while (($$${DIR_ELEM newVarName default="dirElement"} = readdir(${DIRH editable=false})) !== false) { ${selection}${cursor} } closedir($$${DIRH editable=false}); } |
| iter |
for ($$${IDX newVarName default="index"} = 0; $$${IDX editable=false} < count(${ARRAY variableFromPreviousAssignment instanceof="array" default="$array"}); $$${IDX editable=false}++) { ${selection}${cursor} } |
| swi |
switch (${VARIABLE variableFromPreviousAssignment default="$variable"}) { case ${$value}: ${selection}${cursor} break; default: break; } |
| while |
while (${CONDITION variableFromPreviousAssignment instanceof="boolean" default="true"}) { ${selection}${cursor} } |
|
Favourited by 2 Members:
Comments
No comments yet. Add yours below!
Add a Comment
You are posting a reply. Cancel Reply.
Contents
This code template is based on the Yii/PHP NetBeans template downloadable here: http://www.yiiframework.com/wiki/83/netbeans-ide-and-yii-projects/
Cheatographer
www.tremani.nl
More by hoplayann
Cheat Sheet Stats
Tags
Related (shares tags with):
Thumbnail