Jump to content
php.lv forumi

Call to private method TKlase::PrivFunc() from context ''


Joyride

Recommended Posts

No klases konstruktora izsaucu tas pasas klases funkciju, kas defineta ka privata...

 

	  public function __construct($var)
  {
	 $this->PrivFunc($var);
  }

	  private function PrivFunc($var)
  {
	 ...
  }

bet dabuju topika nosaukuma redzamo erroru. Kur ir kljuda? PHP v. 5.2

Link to comment
Share on other sites

Oops, sorry, mana kljuda, biju izsaucis to privato funkciju arpus klases. Sakuma biju domajis taisit ka publisku, pec tam padomaju, ka lai ietaupitu izsauksanu, to var veikt konstruktora. Pirmdienas vakara nogurums dara savu :)

Link to comment
Share on other sites

×
×
  • Create New...