I added Twig template engine to CodeIgniter 2 using this library:
https://github.com/dilantha/codeigniter-twig
Everything works except dum() function. Using dump troughs this error:
Fatal error: Uncaught exception 'Twig_Error_Syntax' with message 'Unknown "dump" function. Did you mean "var_dump", "debug_zval_dump", "xdebug_var_dump", "mysqli_dump_debug_info", "xdebug_dump_superglobals", "xdebug_dump_aggr_profiling_data"?
This is my Twig Template:
{{ dump() }}
And this is my controller:
public function index()
{
$data = ['title' => 'Title' ];
$this->twig->display('dump.twig', $data);
}
CodeIgniter Version: 2.2.0
Twig Version: 1.35.4