/** * @param IEntity $entity * @param PropertyMetadata $propertyMetadata */ public function __construct(IEntity $entity, PropertyMetadata $propertyMetadata) { $this->setModified = function () use($entity, $propertyMetadata) { $entity->setAsModified($propertyMetadata->name); }; }