Всем привет!
Нужна помощь, есть класс:
Код | class Application extends Main { var $ApplicationName; var $ApplicationPath; var $ApplicationTemplateName; var $ApplicationTemplatePath; var $ApplicationProperty; var $ComponentMessages; public function Component($name, $property = false){ $this->ApplicationName = trim($name); $this->ApplicationProperty = $property; if ($this->getApplicationInfo()){ $this->init($this->ApplicationProperty,$this->ComponentMessages); } else{ return false; } }
. . . . . . . . . . . . . . . . . . . . .
private function init($property, $message){ include_once $this->ApplicationPath; } . . . . . . . . . . . . . . . . . . . . .
public function __IncludeTemplate(){ return include ($this->ApplicationTemplatePath); } }
|
Так вот, в init() инклудится тело компонента в конце выполнения которого вызывается __IncludeTemplate(). В которой подключается шаблон компонента.
Но шаблон не доступен из Init().
Какие компромиссы предложите?
Может не понятно описал - спрашивайте! |