Пример #1
0
 public function talesChainDefaultKeyword(PHPTAL_Php_TalesChainExecutor $executor)
 {
     $executor->doElse();
     $this->bufferizeContent();
     $executor->breakChain();
 }
Пример #2
0
 public function talesChainDefaultKeyword(PHPTAL_Php_TalesChainExecutor $executor)
 {
     $codewriter = $executor->getCodeWriter();
     $executor->doElse();
     $attr_str = $this->_default_escaped !== false ? ' ' . $this->_attribute . '=' . $codewriter->quoteAttributeValue($this->_default_escaped) : '';
     // do not print attribute
     $codewriter->doSetVar($this->_attkey, $codewriter->str($attr_str));
     $executor->breakChain();
 }
Пример #3
0
 public function talesChainDefaultKeyword(PHPTAL_Php_TalesChainExecutor $executor)
 {
     $executor->doElse();
     $this->generateDefault($executor->getCodeWriter());
     $executor->breakChain();
 }
Пример #4
0
 public function talesChainDefaultKeyword(PHPTAL_Php_TalesChainExecutor $executor)
 {
     if (!$this->_chainPartGenerated) {
         throw new PHPTAL_TemplateException("Invalid expression in tal:define", $this->phpelement->getSourceFile(), $this->phpelement->getSourceLine());
     }
     $executor->doElse();
     $this->bufferizeContent($executor->getCodeWriter());
     $executor->breakChain();
 }
Пример #5
0
 public function talesChainDefaultKeyword(PHPTAL_Php_TalesChainExecutor $executor)
 {
     $executor->doElse();
     $code = $this->_default !== false ? "' {$this->_attribute}=\"" . str_replace("'", '\\\'', $this->_default) . "\"'" : '\'\'';
     // do not print attribute
     $this->tag->generator->doSetVar($this->_attkey, $code);
     $executor->breakChain();
 }