public function __construct(array $data = array())
{
foreach ($data as $propertyName => $propertyValue) {
$this->{$propertyName} = $propertyValue;
}
foreach ($this->fieldDefinitions as $fieldDefinition) {
$this->fieldDefinitionsByIdentifier[$fieldDefinition->identifier] = $fieldDefinition;
$this->fieldDefinitionsById[$fieldDefinition->id] = $fieldDefinition;
}
}