home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2006 November (DVD) / PCWELT_11_2006.ISO / casper / filesystem.squashfs / usr / share / gedit-2 / plugins / snippets / php.xml < prev    next >
Encoding:
Extensible Markup Language  |  2006-08-27  |  5.0 KB  |  217 lines

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <snippets language="PHP">
  3.   <snippet id="class">
  4.     <text><![CDATA[#doc
  5. #    classname:    ${1:ClassName}
  6. #    scope:        ${2:PUBLIC}
  7. #
  8. #/doc
  9.  
  10. class ${1:ClassName} ${3:extends AnotherClass}
  11. {
  12.     #    internal variables
  13.     
  14.     #    Constructor
  15.     function __construct ( ${4:argument} )
  16.     {
  17.         ${0:# code...}
  18.     }
  19.     ###    
  20.  
  21. }
  22. ###]]></text>
  23.     <description>class ..</description>
  24.     <tag>class</tag>
  25.   </snippet>
  26.   <snippet id="$">
  27.     <text><![CDATA[\$_COOKIE['${1:variable}']]]></text>
  28.     <description>COOKIE['..']</description>
  29.     <tag>$</tag>
  30.   </snippet>
  31.   <snippet id="do">
  32.     <text><![CDATA[do
  33. {
  34.     ${0:# code...}
  35.     
  36. } while ( ${1:$a <= 10} );]]></text>
  37.     <description>do .. while ..</description>
  38.     <tag>do</tag>
  39.   </snippet>
  40.   <snippet id="elseif">
  41.     <text><![CDATA[elseif ( ${1:condition} )
  42. {
  43.     ${0:# code...}
  44. }]]></text>
  45.     <description>elseif ..</description>
  46.     <tag>elseif</tag>
  47.   </snippet>
  48.   <snippet id="else">
  49.     <text><![CDATA[else
  50. {
  51.     ${0:# code...}
  52. }]]></text>
  53.     <description>else ..</description>
  54.     <tag>else</tag>
  55.   </snippet>
  56.   <snippet id="$-1">
  57.     <text><![CDATA[\$_ENV['${1:variable}']]]></text>
  58.     <description>ENV['..']</description>
  59.     <tag>$</tag>
  60.   </snippet>
  61.   <snippet id="$-2">
  62.     <text><![CDATA[\$_FILES['${1:variable}']]]></text>
  63.     <description>FILES['..']</description>
  64.     <tag>$</tag>
  65.   </snippet>
  66.   <snippet id="foreach">
  67.     <text><![CDATA[foreach( \$${1:variable} as \$${2:key} => \$${3:value} )
  68. {
  69.     ${0:# code...}
  70. }]]></text>
  71.     <description>foreach ..</description>
  72.     <tag>foreach</tag>
  73.   </snippet>
  74.   <snippet id="for">
  75.     <text><![CDATA[for ( \$${1:i}=${2:0}; \$${1:i} < $3; \$${1:i}++ )
  76.     ${0:# code...}
  77. }]]></text>
  78.     <description>for ..</description>
  79.     <tag>for</tag>
  80.   </snippet>
  81.   <snippet id="function">
  82.     <text><![CDATA[${1:public }function ${2:FunctionName} (${3: \$${4:value}${5:=''} })
  83. {
  84.     ${0:# code...}
  85. }]]></text>
  86.     <description>function ..</description>
  87.     <tag>function</tag>
  88.   </snippet>
  89.   <snippet id="$-3">
  90.     <text><![CDATA[\$_GET['${1:variable}']]]></text>
  91.     <description>GET['..']</description>
  92.     <tag>$</tag>
  93.   </snippet>
  94.   <snippet id="globals">
  95.     <text><![CDATA[\$GLOBALS['${1:variable}']${2: = }${3:something}${4:;}$0]]></text>
  96.     <description>$GLOBALS['..']</description>
  97.     <tag>globals</tag>
  98.   </snippet>
  99.   <snippet id="if?">
  100.     <text><![CDATA[\$${1:retVal} = ( ${2:condition} ) ? ${3:a} : ${4:b} ;]]></text>
  101.     <description>$.. =</description>
  102.     <tag>iff</tag>
  103.   </snippet>
  104.   <snippet id="ifelse">
  105.     <text><![CDATA[if ( ${1:condition} )
  106. {
  107.     ${2:# code...}
  108. }
  109. else
  110. {
  111.     ${3:# code...}
  112. }
  113. $0]]></text>
  114.     <description>if .. else ..</description>
  115.     <tag>ifelse</tag>
  116.   </snippet>
  117.   <snippet id="if">
  118.     <text><![CDATA[if ( ${1:condition} )
  119. {
  120.     ${0:# code...}
  121. }]]></text>
  122.     <description>if ..</description>
  123.     <tag>if</tag>
  124.   </snippet>
  125.   <snippet id="incl1">
  126.     <text><![CDATA[include_once( '${1:file}' );$0]]></text>
  127.     <description>include_once</description>
  128.     <tag>inclo</tag>
  129.   </snippet>
  130.   <snippet id="incl">
  131.     <text><![CDATA[include( '${1:file}' );$0]]></text>
  132.     <description>include</description>
  133.     <tag>incl</tag>
  134.   </snippet>
  135.   <snippet id="array">
  136.     <text><![CDATA[\$${1:arrayName} = array( '$2'${3:,} );$0]]></text>
  137.     <description>$.. = array</description>
  138.     <tag>array</tag>
  139.   </snippet>
  140.   <snippet id="php">
  141.     <text><![CDATA[<?php
  142.  
  143.     $0
  144.  
  145. ?>]]></text>
  146.     <description><?php .. ?></description>
  147.     <tag>php</tag>
  148.   </snippet>
  149.   <snippet id="$-4">
  150.     <text><![CDATA[\$_POST['${1:variable}']]]></text>
  151.     <description>POST['..']</description>
  152.     <tag>$</tag>
  153.   </snippet>
  154.   <snippet id="print">
  155.     <text><![CDATA[print "${1:string}"${2: . };$0]]></text>
  156.     <description>print ".."</description>
  157.     <tag>print</tag>
  158.   </snippet>
  159.   <snippet id="$-5">
  160.     <text><![CDATA[\$_REQUEST['${1:variable}']]]></text>
  161.     <description>REQUEST['..']</description>
  162.     <tag>$</tag>
  163.   </snippet>
  164.   <snippet id="req1">
  165.     <text><![CDATA[require_once( '${1:file}' );$0]]></text>
  166.     <description>require_once</description>
  167.     <tag>reqo</tag>
  168.   </snippet>
  169.   <snippet id="req">
  170.     <text><![CDATA[require( '${1:file}' );$0]]></text>
  171.     <description>require</description>
  172.     <tag>req</tag>
  173.   </snippet>
  174.   <snippet id="$-6">
  175.     <text><![CDATA[\$_SERVER['${1:variable}']]]></text>
  176.     <description>SERVER['..']</description>
  177.     <tag>$</tag>
  178.   </snippet>
  179.   <snippet id="$-7">
  180.     <text><![CDATA[\$_SESSION['${1:variable}']]]></text>
  181.     <description>SESSION['..']</description>
  182.     <tag>$</tag>
  183.   </snippet>
  184.   <snippet id="case">
  185.     <text><![CDATA[case '${1:variable}':
  186.     ${0:# code...}
  187. break;]]></text>
  188.     <description>case ..</description>
  189.     <tag>case</tag>
  190.   </snippet>
  191.   <snippet id="switch">
  192.     <text><![CDATA[switch ( ${1:variable} )
  193. {
  194.     case '${2:value}':
  195.         ${3:# code...}
  196.     break;
  197.     
  198.     $0
  199.             
  200.     default:
  201.         ${4:# code...}
  202.     break;
  203. }]]></text>
  204.     <description>switch ..</description>
  205.     <tag>switch</tag>
  206.   </snippet>
  207.   <snippet id="while">
  208.     <text><![CDATA[while ( ${1:$a <= 10} )
  209. {
  210.     ${0:# code...}
  211. }]]></text>
  212.     <description>while ..</description>
  213.     <tag>while</tag>
  214.   </snippet>
  215. </snippets>
  216.