Autor Beitrag
Heiko
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3169
Erhaltene Danke: 11



BeitragVerfasst: Sa 22.09.07 18:01 
Hallo,

ich habe folgenden Grundaufbau:

ausblenden C#-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
class modTPL implements modInterf{
  public $test = "blubb";

  //...

  //Seite öffnen
  public function openPage($title = ""){
    echo $this->test;
    ...
  }
  ...
}


ausblenden C#-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
class modul_acp_user extends modTPL{
  public $test = "test";

  public function openPage(){
    parent::openPage('ACP-User');
  }
  ...
}


Wenn nun vom modul_acp_user die Funktion openPage aufgerufen wird, soll "test" ausgegeben werden anstatt "blubb". Allerdings geht das nicht. Geht das trotzdem irgendwie bei PHP oder muss ich es immer über Parameter machen?

Grüße
Heiko
DarkHunter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 477

Win XP
D3 Prof, D2005 PE
BeitragVerfasst: Sa 22.09.07 23:19 
ich verstehe nicht ganz, wo das Problem ist.

Wenn ich deine Klassen nehme und ausführe wird "test" ausgegeben.
Das soll doch auch passieren oder?

_________________
I believe that every human has a finite number of heart-beats. I don't intend to waste any of mine running around doing exercises.
- Neil Armstrong
Heiko Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3169
Erhaltene Danke: 11



BeitragVerfasst: So 23.09.07 10:09 
:autsch: Fehler gefunden. Das "blubb" hatte ich bei mir nicht dastehen, wes wegen ich immer nach "test" gesucht habe. Aber wenn man auf einer anderen Seite, also einem anderem Modul, ist wird das nix ;).