In order to attach additional behaviour whenever a property gets read or written, the index methods #[] and #[]= should be used for calling Property#get and Property#set as opposed to using the attribute readers and writers.
This would for instance allow one to implement dirty attribute tracking by overriding []= or track which properties have been initialized vs. which properties fall back to their default.
In order to attach additional behaviour whenever a property gets read or written, the index methods
#[]and#[]=should be used for callingProperty#getandProperty#setas opposed to using the attribute readers and writers.This would for instance allow one to implement dirty attribute tracking by overriding
[]=or track which properties have been initialized vs. which properties fall back to their default.