PHP code example of tomasvotruba / torch
1. Go to this page and download the library: Download tomasvotruba/torch library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
tomasvotruba / torch example snippets
use Twig\Environment;
Environment with everything needed for smoke render
$environment = new Environment(...);
return $environment;
// override twig functions you need
StaticParameterProvider::set('overrideFunctions', [
// provide static value for dynamic function
'baseTemplate' => function () {
return DummyTheme::LAYOUT_NAME;
},
]);
vendor/bin/torch run templates