kenjis / codeigniter-ss-twig

A Simple and Secure Twig integration for CodeIgniter 3.x and 4.x
MIT License
168 stars 46 forks source link

improvement #3

Closed dexterns88 closed 9 years ago

dexterns88 commented 9 years ago

Can you add configuration for twig in codeigniter.

kenjis commented 9 years ago

What configuration do you need?

kenjis commented 9 years ago

@dexterns88 What configuration do you need?

dexterns88 commented 9 years ago

I need to extend twig function with some php function and maybe to add configuration for turn off/on cache and patch to cache folder and similar.

kenjis commented 9 years ago

Now you can configure cache option: https://github.com/kenjis/codeigniter-ss-twig#loading-twig-library

If you want to add twig function, you can get Twig_Environment instance using $this->twig->getTwig().

$twig = $this->twig->getTwig();
$twig->addFunction($function);
kenjis commented 9 years ago

If you have still any suggestions, please feel free to create a new issue.