note 128413 added to language.oop5.inheritance
| From: | geider at gmx dot de | Date: | Thu, 20 Apr 2023 16:09:53 +0000 |
| Subject: | note 128413 added to language.oop5.inheritance | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-220368@lists.php.net to get a copy of this message | ||
<?php
class TNIntern extends Teilnehmer
{
private $abteilung;
private static $anzahl=0;
public function __construct($n,$vn,$c,$abt)
{
parent::__construct($n,$vn,$c); //Aufruf des Konstruktion der Elternklasse
$this->abteilung=$abt;
self::$anzahl++;
}
public function getDaten()
{
if (substr($this->code,0,1)!=="#") {$this->code="Fehler";}
echo "<p>Name: ".$this->name."<br> Vorname:
".$this->vorname."<br>Code: ".$this->code."<br>Abteilung:
".$this->abteilung."<br>----------------------------------------</p>";
}
public static function getAnzahl()
{
echo "<p>Teilnehmer: ".self::$anzahl."</p>";
}
}
?>
----
Server IP: 45.112.84.4
Probable Submitter: 80.90.13.130 (proxied: 2a00:20:3053:822e:8dda:37c8:bbdc:a721)
----
Manual Page -- https://php.net/manual/en/language.oop5.inheritance.php
Edit -- https://main.php.net/note/edit/128413
Del: integrated -- https://main.php.net/note/delete/128413/integrated
Del: useless -- https://main.php.net/note/delete/128413/useless
Del: bad code -- https://main.php.net/note/delete/128413/bad+code
Del: spam -- https://main.php.net/note/delete/128413/spam
Del: non-english -- https://main.php.net/note/delete/128413/non-english
Del: in docs -- https://main.php.net/note/delete/128413/in+docs
Del: other reasons-- https://main.php.net/note/delete/128413
Reject -- https://main.php.net/note/reject/128413
Search -- https://main.php.net/manage/user-notes.php