Exemplo n.º 1
0
 public function compile(Twig_Compiler $compiler)
 {
     if (PHP_VERSION_ID >= 50600) {
         return parent::compile($compiler);
     }
     $compiler->raw('pow(')->subcompile($this->getNode('left'))->raw(', ')->subcompile($this->getNode('right'))->raw(')');
 }
Exemplo n.º 2
0
 /**
  * Compiles the node to PHP.
  *
  * @param Twig_Compiler $compiler A Twig_Compiler instance
  */
 public function compile(Twig_Compiler $compiler)
 {
     $compiler->raw('intval(floor(');
     parent::compile($compiler);
     $compiler->raw('))');
 }
Exemplo n.º 3
0
 public function compile($compiler)
 {
     $compiler->raw('floor(');
     parent::compile($compiler);
     $compiler->raw(')');
 }