![]() |
![]() |
![]()
Post
#1
|
|
![]() Grupa: Zarejestrowani Postów: 26 Pomógł: 2 Dołączył: 29.12.2008 Ostrzeżenie: (0%) ![]() ![]() |
Witam,
Pwiedzmy, że mam coś takiego: Kod class A { protected $var; protected $event; public function __construct() { $this->event = new B(); echo $this->event->func(); } } class B extends A { public function func() { $this->var = "dziala"; return $this->var; } } $obj = new A; Chodzi o to, że chce stworzyć obiekt klasy potomnej w rodzicu, ale ten kod nie działa(nic nie wyświetla).Mógłby ktoś nakierować mnie co robię źle. |
|
|
![]() ![]() |
![]() |
Wersja Lo-Fi | Aktualny czas: 14.08.2025 - 03:11 |