public function enterText(Text $node) { $content = $node->getContent(); $escaping = $node->getEscaping(); if (true === $escaping->isEnabled()) { $flag = '&'; if ($node->getEscaping()->isOnce()) { $flag .= '!'; } $content = $flag . $content; } elseif (false === $escaping->isEnabled()) { $content = '!' . $content; } $this->raw('text(' . $content . ')'); }
public function enterText(Text $node) { $string = $node->getContent(); if ($this->isEchoMode()) { if ($node->getEscaping()->isEnabled()) { $once = $node->getEscaping()->isOnce(); $string = $this->escapeHtml($string, !$once); } $string = $this->escapeLanguage($string); $this->raw($string); } else { $string = $this->stringLiteral($string); $this->raw($string); } }