Ejemplo n.º 1
0
 public static function install(Latte\Compiler $parser)
 {
     $me = new static($parser);
     $me->addMacro('src', function (MacroNode $node, PhpWriter $writer) use($me) {
         return $me->macroSrc($node, $writer);
     }, NULL, function (MacroNode $node, PhpWriter $writer) use($me) {
         return ' ?> src="<?php ' . $me->macroSrc($node, $writer) . ' ?>"<?php ';
     });
 }
Ejemplo n.º 2
0
 public static function install(Compiler $parser, $baseUrl = null)
 {
     self::$baseUrl = $baseUrl;
     $me = new static($parser);
     $me->addMacro('src', function (MacroNode $node, PhpWriter $writer) use($me) {
         return $me->macroSrc($writer);
     }, null, function (MacroNode $node, PhpWriter $writer) use($me) {
         return ' ?> src="<?php ' . $me->macroSrc($writer) . ' ?>" data-imager="index"<?php ';
     });
 }