Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Smarty has a deprecated constructor in /var/www/vhosts/televisiegids.net/httpdocs/library/Smarty/Smarty.class.php on line 64
class SmartyView extends Zend_View_Abstract
{
protected $_smarty;
public function __construct($config = array())
{
$this->_smarty = new Smarty();
if(!isset($config['templateDir']))
throw new Exception('templateDir is not set for' . get_class($this));
else
$this->_smarty->template_dir = $config['templateDir'];
if(!isset($config['compileDir']))
throw new Exception('compileDir is not set for '.get_class($this));
else
$this->_smarty->compile_dir = $config['compileDir'];
if(isset($config['configDir']))
$this->_smarty->config_dir = $config['configDir'];
if(isset($config['pluginDir']))
$this->_smarty->plugin_dir[] = $config['pluginDir'];
parent::__construct($config);
}
public function getEngine()
{
return $this->_smarty;
}
public function __set($key,$val)
{
$this->_smarty->assign($key,$val);
}
public function __isset($key)
{
$var = $this->_smarty->get_template_vars($key);
if($var)
return true;
return false;
}
public function __unset($key)
{
$this->_smarty->clear_assign($key);
}
public function assign($spec,$value = null)
{
if($value === null)
$this->_smarty->assign($spec);
else
$this->_smarty->assign($spec,$value);
}
public function clearVars()
{
$this->_smarty->clear_all_assign();
}
public function display($file)
{
$this->_smarty->display($file . '.tpl');
}
public function fetch($file)
{
return $this->_smarty->fetch($file . '.tpl');
}
protected function _run()
{
$this->strictVars(true);
$this->_smarty->assign_by_ref('this',$this);
$templateDirs = $this->getScriptPaths();
$file = substr(func_get_arg(0),strlen($templateDirs[0]));
$this->_smarty->template_dir = $templateDirs[0];
$this->_smarty->compile_id = $templateDirs[0];
echo $this->_smarty->fetch($file);
}
}
?>
Warning: include(SmartyView.php): failed to open stream: No such file or directory in /var/www/vhosts/televisiegids.net/httpdocs/library/Zend/Loader.php on line 83
Warning: include(SmartyView.php): failed to open stream: No such file or directory in /var/www/vhosts/televisiegids.net/httpdocs/library/Zend/Loader.php on line 83
Warning: include(): Failed opening 'SmartyView.php' for inclusion (include_path='.:./library:./application/models/:.:/opt/plesk/php/7.4/share/pear') in /var/www/vhosts/televisiegids.net/httpdocs/library/Zend/Loader.php on line 83
Fatal error: Uncaught Error: Class 'SmartyView' not found in /var/www/vhosts/televisiegids.net/httpdocs/index.php:86
Stack trace:
#0 {main}
thrown in /var/www/vhosts/televisiegids.net/httpdocs/index.php on line 86