This is an error 404
There are `0` results
preferences:
144.53 ms | 1390 KiB | 7 Q<?php
class StaticA {
public function setEmail($redirect) {
$this->email = $redirect;
}
protected function returnthis(){
return $this;
}
private function dosomething(){
echo "Unrsprüngliche Methode";
$obj = parent::returnthis();
echo $obj->email;
}
public function classInfo(){
echo get_class(new self). "\n";
echo $this->email. "\n";
}
}
class StaticB extends StaticA {
public function test(){
//parent::classInfo();
}
public function doit(){
dosomething();
}
private function osomething(){
$obj = parent::returnthis();
echo "Neue Methode!". "\n";
echo "Hier ist die E-Mail aus der Elternklasse heraus: ".$obj->email;
}
}
$object = new StaticB();
$object->setEmail("erno@01art.de");
$object->doit();