ride/lib-template-smarty

Smarty engine for the template library of the Ride framework.

2.0.0 2024-04-19 13:03 UTC

This package is auto-updated.

Last update: 2024-11-19 14:12:58 UTC


README

Smarty engine for the template library of the PHP Ride framework.

Read the documentation for Smarty.

Code Sample

Check this code sample to see how to initialize this library:

use ride\library\template\engine\SmartyEngine;
use ride\library\template\engine\SmartyResourceHandler;

function createSmartyTemplateEngine(System $system) {
    $resourceHandler = new SmartyResourceHandler($system->getFileBrowser(), 'view/smarty');
    $compileDirectory = $system->getFileSystem()->getFile('/path/to/compile/cache');
    $escapeHtml = true;
    
    $engine = new SmartyEngine($resourceHandler, $compileDirectory, $escape);
    $engine->addPublicDirectory('/path/to/plugins');
    
    return $engine;
}

Implementations

You can check the related implementations of this library:

Installation

You can use Composer to install this library.

composer require ride/lib-template-smarty