Download the PHP package austp/smarty-slim-view without Composer
On this page you can find all versions of the php package austp/smarty-slim-view. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download austp/smarty-slim-view
More information about austp/smarty-slim-view
Files in austp/smarty-slim-view
Download austp/smarty-slim-view
More information about austp/smarty-slim-view
Files in austp/smarty-slim-view
Vendor austp
Package smarty-slim-view
Short Description View that allows you to use Smarty with Slim
License MIT
Homepage https://github.com/AustP/smarty-slim-view
Package smarty-slim-view
Short Description View that allows you to use Smarty with Slim
License MIT
Homepage https://github.com/AustP/smarty-slim-view
Please rate this library. Is it a good library?
Informations about the package smarty-slim-view
smarty-slim-view
View that allows you to use Smarty with Slim
Installation
composer require austp/smarty-slim-view
As a note, you will still need to require Slim and Smarty yourself. This view just integrates the two.
Configuration
You need to define your template, compile, and cache directories upon initializing the View. You can also optionally define a plugin directory.
public function __construct($template_dir, $compile_dir, $cache_dir, $plugin_dir = '');
Use
<?php
require('vendor/autoload.php');
$app = new \Slim\Slim([
'view' => new \Slim\View\Smarty(
__DIR__ . '/templates',
__DIR__ . '/templates/compile',
__DIR__ . '/templates/cache
);
]);
$app->get('/', function () use ($app) {
$view = $app->view();
$view->assign('title', 'Hello World');
$view->display('base.tpl');
});
$app->run();
All versions of smarty-slim-view with dependencies
PHP Build Version
Package Version
Requires
slim/slim Version
>=2.4.0
The package austp/smarty-slim-view contains the following files
Loading the files please wait ....