[eluser]mvdg27[/eluser]
Hi guys,
Today I decided I wanted to play around with Smarty3.0 (beta) for a bit. But I'm encountering an error, and I don't really understand where it's coming from.
What I've done so far is creating a class called smarty_parser in my Application libraries. The library requires the Smarty 3.0 class (all files are located inside a subfolder smarty3.0 inside the libraries folder) and it extends the Smarty class.
Code:
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
require "smarty3/Smarty.class.php";
class Smarty_parser extends Smarty {
function Smarty_parser() {
print 'ok';
}
}
I haven't done anything else yet, as this already throws an error ... I found already that the error is caused by requiring the Smarty class. When I comment this out, I don't get this error.
Code:
Fatal error: Uncaught exception 'LogicException' with message 'Class CI_Smarty_parser could not be loaded' in /system/libraries/Loader.php:879
Stack trace:
#0 [internal function]: spl_autoload('CI_Smarty_parser')
#1 /system/libraries/Loader.php(879): class_exists('CI_Smarty_parser')
#2 /system/libraries/Loader.php(829): CI_Loader->_ci_init_class('Smarty_parser', '', NULL, NULL)
#3 /system/libraries/Loader.php(96): CI_Loader->_ci_load_class('smarty_parser', NULL, NULL)
#4 /system/application/controllers/web.php(15): CI_Loader->library('smarty_parser')
#5 /system/codeigniter/CodeIgniter.php(201 in /system/libraries/Loader.php on line 879
Can anyone explain me what could be causing this error? I'm happy to spend some time getting it to work, but it's getting kind of difficult if I don't get what's going wrong
Thanks! -Michiel