Is there a way to set the default delimiter to double in version 3?

machina86
Member | 6
+
0
-

Looking to set the default syntax to {{$var}} when setting up the engine.

Thought I was getting close with the Latte\Compiler\TemplateLexer->setSyntax() but I can't extend anything due to all the private vars/classes.

Would be nice if Latte\Engine had a public var for $defaultSyntax or something to make it super easy.

Maybe I am missing something.

dakur
Member | 493
+
0
-

This could work I'd say.. Didn't try.

$latte = new \Latte\Engine();
$latte->getParser()->setSyntax('double');
machina86
Member | 6
+
0
-

No dice … there is no method for getting the parser.
$latte->parse() sets $lexer = new Compiler\TemplateLexer; but $lexar is not a public var in the Engine class so we can't use the setSyntax() of the $lexar unfortunately.