public function render(array $args = array()) { $code = $this->name; if ($this->default) { $code .= ' = ' . VariableDeflator::deflate($this->default); } return $code; }
public function render(array $args = array()) { $strs = array(); foreach ($this->arguments as $arg) { $strs[] = VariableDeflator::deflate($arg); } return join(', ', $strs); }
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); }
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); }
public function render(array $args = array()) { return VariableDeflator::deflate($this->lvalue) . ' = ' . VariableDeflator::deflate($this->expr); }