How to make a final attribute in a PHP class?

php

Solution

i'm not sure if this will work but you could try playing with the Reflection class and detect if any child has redeclared the property and then fire an exception or something

UPDATE:

check this links out:

http://www.php.net/manual/en/reflectionproperty.getdeclaringclass.php

and

http://www.php.net/manual/en/reflectionproperty.setaccessible.php

It should help

Problem

I would like to prevent a child class from redeclaring some parent's attributes. How can I do that? EDIT: If my parent class has a "title" property, i don't want that children can (re)declare property with this name

Original source