No logro ahcerlo funcionar asi yo tengo mi codigo, mi index:
Código PHP:
/*-- Esta es mi funcion --*/
function TestFuncion($var,$var2)
{
$allvar = $var.$var2;
return $allvar;
}
/*-----*/
require_once 'Twig/Autoloader.php';
Twig_Autoloader::register();
$loader = new Twig_Loader_Filesystem('templates');
$twig = new Twig_Environment($loader, array(
'cache' => 'cache',
'debug' => 'true'));
$template = $twig->loadTemplate('index.twig.html');
echo $template->render(array(
));
Como tendria que quedar?