PHP: Statik işlevinin

0 Cevap php

i've one stupid question. I keep trying to write my framework, but ... i miss something. I have one base class Base.class.php, with some functions. When, i write another class SubBase.class.php, who extends Base, i trying to set one variable , who must use in Base class, in one static function (maybe). Something like that

class Base { 
 public $vars;
 public function GetA() { 
  return $this->vars;
 }
}


public SubBase extends Base { 
 public function __construct() { 
  $this->vars = array();
 }
}

But, i missing something ... In role, my SubBase is subpage from my web, Base is printHTML class. I trying to set a title to my web, with my Base class, who set $this->vars in my SubBase class o.O Please, tell me if i'm wrong, and let me know how to write this. I wonna just write

<title> <?php echo Base::GetTitle(); ?> </title>

ve içeri göstermek

0 Cevap