joachim-n / mutable-typed-data

Typed data system with mutable properties
GNU General Public License v3.0
1 stars 2 forks source link

prevent property using a reserved string as a name #10

Open joachim-n opened 2 years ago

joachim-n commented 2 years ago

If you define a property called 'name' then accessing it breaks because DataItem::$name is defined as a class property, so doing $data->name won't work.

Outside of the class it probably works because the properties are protected, so you get to the magic accessor, but inside it things will go wrong.