Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
  • 2 commits
  • 1 file changed
  • 0 comments
  • 1 contributor

Showing 1 changed file with 29 additions and 0 deletions. Show diff stats Hide diff stats

  1. 29  eclipse_templates/templates.xml
29  eclipse_templates/templates.xml
... ...
@@ -0,0 +1,29 @@
  1
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><templates><template autoinsert="true" context="php" deleted="false" description="generate setters and getters " enabled="true" name="setget">/**
  2
+* @var ${type} ${dollar}_${lowerName}
  3
+*/
  4
+protected ${dollar}_${lowerName};
  5
+${cursor}
  6
+/**
  7
+* Enter_Description
  8
+*
  9
+* @param ${type} ${lowerName}
  10
+* @return ${dollar}this fluent interface
  11
+*/
  12
+public function set${UpperName}(${dollar}${lowerName}){
  13
+	${dollar}this-&gt;_${lowerName} = ${dollar}${lowerName};
  14
+	return ${dollar}this;
  15
+}
  16
+
  17
+/**
  18
+* Enter_Description
  19
+* 
  20
+* @return ${type} Description
  21
+* @throws Exception if unset
  22
+*/
  23
+public function get${UpperName}(){
  24
+	if (!${dollar}this-&gt;_${lowerName}){
  25
+		throw new Exception("${UpperName} is not set.");
  26
+	}
  27
+	return ${dollar}this-&gt;_${lowerName};
  28
+}
  29
+</template></templates>

No commit comments for this range

Something went wrong with that request. Please try again.