Пример #1
0
 public function render(array $args = array())
 {
     $code = $this->name;
     if ($this->default) {
         $code .= ' = ' . VariableDeflator::deflate($this->default);
     }
     return $code;
 }
Пример #2
0
 public function render(array $args = array())
 {
     $strs = array();
     foreach ($this->arguments as $arg) {
         $strs[] = VariableDeflator::deflate($arg);
     }
     return join(', ', $strs);
 }
Пример #3
0
 public function render(array $args = array())
 {
     $this->if->setIndentLevel($this->indentLevel + 1);
     $this[] = 'if (' . VariableDeflator::deflate($this->condition) . ') {';
     $this[] = $this->if;
     if ($this->else) {
         $this[] = '} else {';
         $this->else->setIndentLevel($this->indentLevel + 1);
         $this[] = $this->else;
         $this[] = '}';
     } else {
         $this[] = '}';
     }
     return Block::render($args);
 }
Пример #4
0
 public function render(array $args = array())
 {
     $this->if->setIndentLevel($this->indentLevel + 1);
     $this[] = 'if (' . VariableDeflator::deflate($this->condition) . ') {';
     $this[] = $this->if;
     $trailingBlocks = array();
     if (!empty($this->elseifs)) {
         foreach ($this->elseifs as $elseIf) {
             $trailingBlocks[] = rtrim($elseIf->render($args));
         }
     }
     if ($this->else) {
         $trailingBlocks[] = rtrim($this->else->render($args));
     }
     $this[] = '}' . join('', $trailingBlocks);
     return parent::render($args);
 }
Пример #5
0
 public function render(array $args = array())
 {
     return VariableDeflator::deflate($this->lvalue) . ' = ' . VariableDeflator::deflate($this->expr);
 }