public function __construct(ContentTypeService $contentTypeService, array $data = array()) { $this->contentTypeService = $contentTypeService; foreach ($data as $propertyName => $propertyValue) { $this->{$propertyName} = $propertyValue; } }