Search found 2 matches

by next08
Thu Aug 31, 2006 9:02 pm
Forum: PHP - Code
Topic: Using __get() to take away the necessity of PRIVATE variable
Replies: 3
Views: 200

I know that, but I meant it in the context of the program illustrated above. There is a role in private/public for class derivation, and that error handling is taken to a new level. But I'm saying, in the context of this very simple program, there is no point (unless I make derived classes) in makin...
by next08
Thu Aug 31, 2006 8:37 pm
Forum: PHP - Code
Topic: Using __get() to take away the necessity of PRIVATE variable
Replies: 3
Views: 200

Using __get() to take away the necessity of PRIVATE variable

I just have a little question : now that PHP5 allows the new overloaded functions __get() and __set(), does it take away the meaning of PRIVATE and PUBLIC non-static variables ? For instance : class Object { public $var; public function __get($name) { return null; } public function __set($name, $val...