PHP 5 DOM and exposing properties

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Michaelp

    PHP 5 DOM and exposing properties

    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 misunderstandin g 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






Working...