Rasmus Lerdorf schrieb:
> > If anyone has any idea, or tricks to hide information in a variables or
> > method in a class, or in other words, make a variable or method a private,
> > I would really like to know. Thanks for any comments.
> 
> PHP also doesn't have introspection, so there isn't a good way for people
> to see what is in your API so a bit of obscurity should hide things for
> you.

Hmm, the old, dirty hack print_r($obj). And the new functions:

http://www.php.net/manual/en/function.get-class.php
http://www.php.net/manual/en/function.get-class-vars.php
http://www.php.net/manual/en/function.get-object-vars.php
http://www.php.net/manual/en/function.get-class-methods.php
...

I'd call these not only debugging function but functions that can be
used for introspection.

Anyway, people should not use parts of the API your documentation does
not mention as public. Whoever does so, should reread the book on OOP.
Yes, it could be better, but think of the zillions of PHP scripts that
will break and all the beginners - PHP is quite often a beginners
language - will ask you, Reuben, for support ;).

Ulf

-- 
Neu: PEAR Cache Erweiterung OutputCompression
http://www.ulf-wendel.de/php/show_source.php?file=out_cache_com
http://www.phpdoc.de

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to