X-Git-Url: http://git.phpeclipse.com
diff --git a/net.sourceforge.phpeclipse/templates/default-templates.xml b/net.sourceforge.phpeclipse/templates/default-templates.xml
index 352bfbf..cdec7e2 100644
--- a/net.sourceforge.phpeclipse/templates/default-templates.xml
+++ b/net.sourceforge.phpeclipse/templates/default-templates.xml
@@ -1,70 +1,179 @@
-class ${class_name} {
- function ${class_name}() {
- ${cursor}
- }
-}
-class ${class_name} {
- var $$${attribute};
- function ${class_name}() {
- ${cursor}
- }
-
- function set_${attribute}( $$${attr} ) {
- $$this->${attribute} = $$${attr};
+class ${class_name} {
+ function ${class_name}() {
+ ${cursor}
}
-
+}
+class ${class_name} {
+ var $$${attribute};
+
+ function ${class_name}() {
+ ${cursor}
+ }
+
+ function set_${attribute}( $$${attr} ) {
+ $$this->${attribute} = $$${attr};
+ }
+
function get_${attribute}() {
- return $$this->${attribute};
+ return $$this->${attribute};
+ }
+}
+class ${class_name} {
+ public function __construct() {
+ ${cursor}
}
}
-for ($$${index} = 0; $$${index} < sizeof($$${array}); $$${index}++) {
+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, $$${max_count} = sizeof( $$${array} ); $$${index} < $$${max_count}; $$${index}++) {
+ $$${array_element} = $$${array}[ $$${index} ];
${cursor}
}
-for ($$${index} = 0; $$${index} < sizeof($$${array}); $$${index}++) {
- $$${array_element} = $$${array}[$$${index}];
+foreach ( $$${array} as $$${value} ) {
+ ${cursor}
+}
+foreach ( $$${array} as $$${key} => $$${value} ) {
+ ${cursor}
+}
+try {
+ ${try}
+}
+try {
+ ${try}
+}
+catch( Exception $$${e} ) {
+ ${catch}
+}
+try {
+ ${try}
+}
+catch( ${Exception} $$${e} ) {
+ ${catch}
+}
+function ${function_name}() {
${cursor}
}
-function ${function_name} () {
+function ${function_name}() {
+ return ${cursor} ;
+}
+function ${function_name}( $$${param} ) {
${cursor}
}
-function ${function_name} () {
- return (${cursor});
+function ${function_name}( $$${param} ) {
+ return ${cursor} ;
}
-while (${condition}) {
+while ( ${condition} ) {
${cursor}
}
-do {
- ${line_selection}${cursor}
-} while (${condition});
-switch (${key}) {
+do {
+ ${line_selection}
+} while ( ${condition} );
+switch ( ${key} ) {
case ${value}:
${cursor}
break;
-
+
default:
break;
-}if (${condition}) {
+}
+if ( ${condition} ) {
${cursor}
-}if (${condition}) {
+}
+if ( ${condition} ) {
${cursor}
-} else {
+}
+else {
-}elseif (${condition}) {
+}
+elseif ( ${condition} ) {
${cursor}
-}else {
+}
+else {
${cursor}
}
-
\ 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}}
+