jednak nie mogę sobię poradzić z pewną rzeczą, a mianowicie:
<?php class application { public $smarty; public $db; public function __construct() { include_once('libs/smarty/Smarty.class.php'); $smarty = new Smarty; } public function render_page() { $this->_module = $_GET[module]; // pobieramy katalog modulu $this->_file = $_GET[view]; // pobieramy plik $this->_file = $this->_module; } if($this->is_module==TRUE && $this->is_module_tpl == TRUE && $this->is_module_controller == TRUE){ // load module controller include_once(VIEW_DIR.$this->_module.'/'.$this->_file.'.php'); $output = new $this->_file; $output->init($smarty, $db); // load module template smarty::display(VIEW_DIR.$this->_module.'/'.$this->_file.'.tpl'); } else { } } } ?>
błąd: Fatal error: Call to undefined method application::fetch() in /home/zeroszum/domains/[DOMENA]/public_html/projekty/kurs_angielskiego/libs/smarty/sysplugins/smarty_internal_templatebase.php on line 377
zależy mi na tym, aby $smarty było dostępne w całej klasie application i i podklasach.
proszę o jakąś podpowiedź
