Re: __get() accessor question (a bug maybe?)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



TemuriI schrieb:
Hi all, here is the code I am having problem with:

============================================

class baseForm {
   private $_id = 10;

   function __get($member)
   {
       echo "Accessing member \"{$member}\" : <br />\n";
       return $this->$member;
   }
   function checkID()
   {
       echo $this->_id."<br />\n";
   }
}
class inputText extends baseForm
{
   function display()
   {
       $this->checkID();
       echo $this->_id."<br />\n";
   }
}
$f = new inputText();
echo $f -> display();


============================================

Probably bcause its private and therefore only for that class?

--
Smileys rule (cX.x)C --o(^_^o)
Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux