X-Git-Url: http://secure.phpeclipse.com
diff --git a/net.sourceforge.phpeclipse/templates/default-templates.xml b/net.sourceforge.phpeclipse/templates/default-templates.xml
index 90c8e86..cdec7e2 100644
--- a/net.sourceforge.phpeclipse/templates/default-templates.xml
+++ b/net.sourceforge.phpeclipse/templates/default-templates.xml
@@ -1,12 +1,15 @@
-class ${class_name} {
+class ${class_name} {
function ${class_name}() {
${cursor}
}
}
-class ${class_name} {
+class ${class_name} {
var $$${attribute};
+
function ${class_name}() {
${cursor}
}
@@ -19,47 +22,120 @@
return $$this->${attribute};
}
}
-for ( $$${index} = 0, $$${index2} = sizeof($$${array}); $$${index} < $$${index2}; $$${index}++ ) {
+class ${class_name} {
+ public function __construct() {
+ ${cursor}
+ }
+}
+class ${class_name} {
+ public function __construct() {
+ ${cursor}
+ }
+
+ public function __destruct() {
+ }
+}
+class ${class_name} {
+ protected $$${attribute};
+
+ public function __construct() {
+ ${cursor}
+ }
+
+ public function __destruct() {
+ }
+
+ public function set${Attribute}( $$${attr} ) {
+ $$this->${attribute} = $$${attr};
+ }
+
+ public function get${Attribute}() {
+ return $$this->${attribute};
+ }
+}
+class ${class_name} {
+ private $$${attribute};
+
+ public function __construct() {
+ ${cursor}
+ }
+
+ public function __destruct() {
+ }
+
+ public function set${Attribute}( $$${attr} ) {
+ $$this->${attribute} = $$${attr};
+ }
+
+ public function get${Attribute}() {
+ return $$this->${attribute};
+ }
+}
+for ( $$${index} = 0, $$${max_count} = sizeof( $$${array} ); $$${index} < $$${max_count}; $$${index}++ ) {
${cursor}
}
-for ($$${index} = 0, $$${index2} = sizeof($$${array}); $$${index} < $$${index2}; $$${index}++) {
- $$${array_element} = $$${array}[$$${index}];
+for ($$${index} = 0, $$${max_count} = sizeof( $$${array} ); $$${index} < $$${max_count}; $$${index}++) {
+ $$${array_element} = $$${array}[ $$${index} ];
${cursor}
}
-foreach ( $$${array} as $$${value} ) {
+foreach ( $$${array} as $$${value} ) {
${cursor}
}
-foreach ( $$${array} as $$${key} => $$${value} ) {
+foreach ( $$${array} as $$${key} => $$${value} ) {
${cursor}
}
-try {
+try {
${try}
}
-try {
+try {
${try}
}
catch( Exception $$${e} ) {
${catch}
}
-try {
+try {
${try}
}
catch( ${Exception} $$${e} ) {
${catch}
}
-function ${function_name}() {
+function ${function_name}() {
${cursor}
}
-function ${function_name}() {
- return ( ${cursor} );
+function ${function_name}() {
+ return ${cursor} ;
}
-while ( ${condition} ) {
+function ${function_name}( $$${param} ) {
${cursor}
}
-do {
- ${line_selection}${cursor}
+function ${function_name}( $$${param} ) {
+ return ${cursor} ;
+}
+while ( ${condition} ) {
+ ${cursor}
+}
+do {
+ ${line_selection}
} while ( ${condition} );
-switch ( ${key} ) {
+switch ( ${key} ) {
case ${value}:
${cursor}
break;
@@ -67,31 +143,37 @@ catch( ${Exception} $$${e} ) {
default:
break;
}
-if ( ${condition} ) {
+if ( ${condition} ) {
${cursor}
}
-if ( ${condition} ) {
+if ( ${condition} ) {
${cursor}
}
else {
}
-elseif (${condition}) {
+elseif ( ${condition} ) {
${cursor}
}
-else {
+else {
${cursor}
}
-
@uses ${element} ${description}
@var ${datatype} ${description}
@version ${versionstring}
-
\ No newline at end of file
+
+ {@example ${uri_or_path_to_file} ${startline} ${number_of_lines}}
+ {@id ${sectionname}}
+ {@internal ${any_text}}}
+ {@inheritdoc}
+ {@link ${URL} ${description}}
+ {@link ${element} ${description}}
+ {@source}
+ {@source ${startline}}
+ {@source ${startline} ${number_of_lines}}
+