Hi,
I am looking at the code from the PropertyObject class in chapter 3.
There is just one thing I can't figure out.
On top of page 57 there is this piece of code:
Code:
if($this->propertyTable[$propertyName] != $value &&
!in_array($propertyName, $this->changedProperties)) {
$this->changedProperties[] = $propertyName;
}
I don't understand why we are testing the $value against $this->propertyTable[$propertyName]
I would think $this->propertyTable[$propertyName] will match a database table name and never match $value.
It would be understandable for me if $value would be checked agains $this->data[$this->propertyTable[$propertyName]]
Can someone please tell me what I am missing?
Thanks