ice / framework

Source code of Ice framework
https://www.iceframework.org
BSD 3-Clause "New" or "Revised" License
341 stars 45 forks source link

View, set engine options on construct #288

Closed mruz closed 4 years ago

mruz commented 4 years ago

Then we could pass options on the engine declaration:

$di->view
    ->setViewsDir('./views/')
    ->setEngines([
        '.sleet' => function ($view) use ($di) {
            return new Ice\Mvc\View\Engine\Sleet($view, $di, [
                'compileDir' =>  './tmp/'
            ]);
        },
    ]);
mruz commented 4 years ago

Also compile should be "always" by default, but it's "never" if we don't specify the option.