コード例 #1
0
 public function __construct(Twig_Node_Print $node)
 {
     parent::__construct($node->expr, $node->getLine(), $node->getNodeTag());
 }
コード例 #2
0
    protected function escapePrintNode(Twig_Node_Print $node, Twig_Environment $env, $type)
    {
        if (false === $type) {
            return $node;
        }

        $expression = $node->getNode('expr');

        if ($this->isSafeFor($type, $expression, $env)) {
            return $node;
        }

        return new Twig_Node_Print(
            $this->getEscaperFilter($type, $expression),
            $node->getLine()
        );
    }