Skip to content

Commit e08b62e

Browse files
author
Caitlin Bales (MSFT)
committed
Camelize setters
1 parent c7acf46 commit e08b62e

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Templates/PHP/Model/ComplexType.php.tt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,12 @@ foreach(var property in complex.Properties.Where(prop => prop.Type.GetTypeString
7171
<#
7272
if (property.Type.GetTypeString() == "\\DateTime") {
7373
#>
74-
$this->_propDict["<#=propertyName#>"]
74+
$this->_propDict["<#=property.Name.ToCamelize()#>"]
7575
= $val->format(\DateTime::ISO8601) . "Z";
7676
<#
7777
} else {
7878
#>
79-
$this->_propDict["<#=propertyName#>"] = $val;
79+
$this->_propDict["<#=property.Name.ToCamelize()#>"] = $val;
8080
<#
8181
}
8282
#>

Templates/PHP/Model/EntityType.php.tt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,11 +144,11 @@ foreach(var property in entity.Properties.Where(prop => prop.Type.GetTypeString(
144144
public function set<#=property.Name.ToCheckedCase()#>($val)
145145
{
146146
<# if (property.Type.GetTypeString() == "bool") { #>
147-
$this->_propDict["<#=property.Name#>"] = boolval($val);
147+
$this->_propDict["<#=property.Name.ToCamelize()#>"] = boolval($val);
148148
<# } else if (property.Type.GetTypeString() == "int") { #>
149-
$this->_propDict["<#=property.Name#>"] = intval($val);
149+
$this->_propDict["<#=property.Name.ToCamelize()#>"] = intval($val);
150150
<# } else { #>
151-
$this->_propDict["<#=property.Name#>"] = $val;
151+
$this->_propDict["<#=property.Name.ToCamelize()#>"] = $val;
152152
<# } #>
153153
return $this;
154154
}

0 commit comments

Comments
 (0)