This commit was generated by cvs2svn to compensate for changes in r59,
[phpeclipse.git] / net.sourceforge.phpeclipse / templates.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <templates>
3 <template name="class" description="class template with constructor" context="php" enabled="true">class ${class_name} {
4   function ${class_name}() {
5           ${cursor}
6   }
7 }</template>
8 <template name="class" description="class with attribute" context="php" enabled="true">class ${class_name} {
9   var $$${attribute};
10   function ${class_name}() {
11           ${cursor}
12   }
13   
14   function set_${attribute}( $$${attr} ) {
15     $$this->${attribute} = $$${attr};
16         }
17
18         function get_${attribute}() {
19     return $$this->${attribute};
20         }
21 }</template>
22 <template name="for" description="iterate over array" context="php" enabled="true">for ($$${index} = 0; $$${index} &lt; sizeof($$${array}); $$${index}++) {
23         ${cursor}
24 }</template>
25 <template name="for" description="iterate over array w/ temporary variable" context="php" enabled="true">for ($$${index} = 0; $$${index} &lt; sizeof($$${array}); $$${index}++) {
26         $$${array_element} = $$${array}[$$${index}];
27         ${cursor}
28 }</template>
29 <template name="function" description="function template" context="php" enabled="true">function ${function_name} () {
30         ${cursor}
31 }</template>
32 <template name="function" description="function template with return" context="php" enabled="true">function ${function_name} () {
33         return (${cursor});
34 }</template>
35 <template name="while" description="while iteration" context="php" enabled="true">while (${condition}) {
36         ${cursor}
37 }</template>
38 <template name="switch" description="switch case statement" context="php" enabled="true">switch (${key}) {
39         case ${value}:
40                 ${cursor}
41                 break;
42
43         default:
44                 break;
45 }</template><template name="if" description="if statement" context="php" enabled="true">if (${condition}) {
46         ${cursor}
47 }</template><template name="ifelse" description="if else statement" context="php" enabled="true">if (${condition}) {
48         ${cursor}
49 } else {
50         
51 }</template><template name="elseif" description="else if block" context="php" enabled="true">elseif (${condition}) {
52         ${cursor}
53 }</template><template name="else" description="else block" context="php" enabled="true">else {
54         ${cursor}
55 }</template>
56 <template name="filecomment" description="file comment used by the class and interface wizards" context="php" enabled="true">/**
57  * Created on ${date} by ${user}
58  *
59  */</template><template name="functioncomment" description="function comment" context="php" enabled="true">/**
60  * @author ${user}
61  *
62  */</template>
63  <template name="echo" description="echo a string" context="php" enabled="true">echo "${string}";
64   ${cursor}</template>
65  </templates>