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

support for the new version ci4 #52

Closed kgrzelak closed 3 years ago

kgrzelak commented 5 years ago

Will there be CI-4 support?

mvolotov commented 5 years ago

I ported this library under CI4 for myself. There is nothing complicated about it. To work, just change a couple of lines in the file. Here is an example

To use, just plug in the library.

<?php namespace App\Controllers;

use App\Controllers\BaseController;
use App\Libraries\Twig;
class Main extends BaseController
{
    public function index()
    {
        $data = [
                 'title' => 'MainPage',
        ];
        $twig = new Twig();
        $twig->display('main', $data);
    }
}
kenjis commented 3 years ago

This is very early development version: https://github.com/kenjis/codeigniter-ss-twig/tree/4.x Comments are welcome.

kenjis commented 3 years ago

@kgrzelak @AsteriaGamer If you have any requests or issues, feel free to create a new issue or a PR.