Skip to content

Commit bced3e8

Browse files
author
Caitlin Bales (MSFT)
committed
Adds proDict and ID getters
1 parent e8e2089 commit bced3e8

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

Templates/PHP/Model/EntityType.php.tt

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,32 @@ class <#=entity.Name.ToCheckedCase()#>
1919
/**
2020
* Construct a new <#=entity.Name.ToUpperFirstChar()#>
2121
*
22-
* @param array $propDict A list of settings to set
22+
* @param array $propDict A list of properties to set
2323
*/
2424
function __construct($propDict = array())
2525
{
2626
$this->_propDict = $propDict;
2727
}
28+
29+
/**
30+
* Gets the property dictionary of the <#=entity.Name.ToUpperFirstChar()#>
31+
*
32+
* @return array The list of properties
33+
*/
34+
public function getProperties()
35+
{
36+
return $this->_propDict;
37+
}
38+
39+
/**
40+
* Gets the item ID
41+
*
42+
* @return array The item ID
43+
*/
44+
public function getId()
45+
{
46+
return $this->_propDict['id'];
47+
}
2848
<#
2949
foreach(var property in entity.Properties.Where(prop => prop.Type.GetTypeString() != "bytes")){
3050
var propertyName = property.Name.ToUnderscore();

0 commit comments

Comments
 (0)