hi
i made a class in PHP. id like to define public and private function for
that class like in C++. is this possible? the public and private inside the
class does not work... why?
thanx, j�rg zgraggen
/* My Class*/
class bz_ClassX
{
var $nNumber;
var $strDescription;
var $strModul;
// public: ??? does not work
function bz_ClassX()
{
$this->bz_reset();
}
function bz_print()
{
echo "<b>Return-Object</b><br>";
echo "<table>";
echo "<tr><td>Modul:</td><td>" . $this->strModul . "</td></tr>";
echo "<tr><td>Method:</td><td>" . $this->strMethod . "</td></tr>";
echo "<tr><td>Number:</td><td>" . $this->nNumber . "</td></tr>";
echo "<tr><td>Description:</td><td>" . $this->strDescription .
"</td></tr>";
echo "</table>";
}
function bz_clear()
{
$this->bz_reset();
}
// private: ??? does not work
function bz_reset()
{
$this->strModul = "Unknown";
$this->strMethod = "Unknown";
$this->nNumber = 0;
$this->strDescription = "Unknown";
}
}
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php