note 35093 added to ref.classobj
| From: | pixellent at stodge dot net | Date: | Tue, 19 Aug 2003 16:07:59 +0000 |
| Subject: | note 35093 added to ref.classobj | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-54698@lists.php.net to get a copy of this message | ||
In case you were wondering, you can't do the following in PHP:
$name = wsConfig::GetInstance()->GetValue("name");
It causes a parse error, I think due to trying to call GetValue. And yes I do have a function called
GetValue in my wsConfig class.
This is my singleton:
function &GetInstance()
{
static $Instance;
if (!isset($Instance))
{
$Instance = new wsConfig();
}
return $Instance;
}
----
Manual Page -- http://www.php.net/manual/en/ref.classobj.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+35093
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+35093&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+35093&report=yes