PHP5 and the DOM model
| From: | Michael Preminger | Date: | Thu, 17 Apr 2008 08:05:11 +0000 |
| Subject: | PHP5 and the DOM model | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-273147@lists.php.net to get a copy of this message | ||
Hello!
Seems that PHP gets more and more object oriented, which is good.
I am now running a course in PHP, using PHP 5, where we are going to
use the *DOM* interface. I am trying to teach them good OO practices,
meaning that we insistently hide properties and expose them as get or
set methods.
Looking at the PHPs *DOM* implementation, I see that many of the
properties are exposed directly, without even offering get methods.
1. Is there something I am misunderstanding orotherwise missing? (I
havenot used *DOM* in PHP before).
2.This poses a pedagogical problem for me as a teacher. How do I
explain this contradiction to my students?
Thanks
Michael