File tree Expand file tree Collapse file tree 2 files changed +25
-10
lines changed
Expand file tree Collapse file tree 2 files changed +25
-10
lines changed Original file line number Diff line number Diff line change @@ -32,9 +32,9 @@ class <#=complex.Name.ToUpperFirstChar()#>
3232 $this->_propDict = $propDict;
3333 }
3434<#
35- foreach(var property in complex.Properties.Where(prop => prop.Type.GetTypeString() != "bytes")){
36- var propertyName = property.Name.ToUnderscore();
37- if (!property.Type.IsComplex()) {
35+ foreach(var property in complex.Properties.Where(prop => prop.Type.GetTypeString() != "bytes")){
36+ var propertyName = property.Name.ToUnderscore();
37+ if (!property.Type.IsComplex()) {
3838#>
3939
4040 /**
@@ -85,7 +85,7 @@ class <#=complex.Name.ToUpperFirstChar()#>
8585 return $this;
8686 }
8787<#
88- } else {
88+ } else {
8989#>
9090
9191 /**
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ class <#=entity.Name.ToCheckedCase()#>
2222 * @var array(string => string)
2323 */
2424 private $_propDict;
25+
2526 /**
2627 * Construct a new <#=entity.Name.ToUpperFirstChar()#>
2728 *
@@ -42,11 +43,11 @@ class <#=entity.Name.ToCheckedCase()#>
4243 return $this->_propDict;
4344 }
4445<#
45- foreach(var property in entity.Properties.Where(prop => prop.Type.GetTypeString() != "bytes")){
46- var propertyName = property.Name.ToUnderscore();
47- var propertyNameCap = property.Name.ToUpperFirstChar();
48- if (property.Type.IsComplex()) {
49- if (property.IsCollection()) {
46+ foreach(var property in entity.Properties.Where(prop => prop.Type.GetTypeString() != "bytes")){
47+ var propertyName = property.Name.ToUnderscore();
48+ var propertyNameCap = property.Name.ToUpperFirstChar();
49+ if (property.Type.IsComplex()) {
50+ if (property.IsCollection()) {
5051#>
5152
5253 /**
@@ -63,8 +64,22 @@ class <#=entity.Name.ToCheckedCase()#>
6364 }
6465 }
6566
67+
68+ /**
69+ * Sets the <#=property.Name#>
70+ *
71+ * @param string $val The <#=property.Name#>
72+ *
73+ * @return <#=entity.Name.ToCheckedCase()#>
74+ */
75+ public function set<#=property.Name.ToCheckedCase()#>($val)
76+ {
77+ $this->_propDict["<#=property.Name.ToCamelize()#>"] = $val;
78+ return $this;
79+ }
80+
6681<#
67- } else {
82+ } else {
6883#>
6984
7085 /**
You can’t perform that action at this time.
0 commit comments