Craft\Minify_TokenParser::parse PHP Méthode

parse() public méthode

..{% endcache %} tags.
public parse ( Twig_Token $token ) : craft\Cache_Node
$token Twig_Token
Résultat craft\Cache_Node
    public function parse(\Twig_Token $token)
    {
        $lineno = $token->getLine();
        $stream = $this->parser->getStream();
        $attrSet = false;
        $attributes = array('html' => false, 'css' => false, 'js' => false);
        if ($stream->test(\Twig_Token::NAME_TYPE, 'html')) {
            $attributes['html'] = true;
            $stream->next();
            $attrSet = true;
        }
        if ($stream->test(\Twig_Token::NAME_TYPE, 'css')) {
            $attributes['css'] = true;
            $stream->next();
            $attrSet = true;
        }
        if ($stream->test(\Twig_Token::NAME_TYPE, 'js')) {
            $attributes['js'] = true;
            $stream->next();
            $attrSet = true;
        }
        $stream->expect(\Twig_Token::BLOCK_END_TYPE);
        $nodes['body'] = $this->parser->subparse(array($this, 'decideCacheEnd'), true);
        $stream->expect(\Twig_Token::BLOCK_END_TYPE);
        return new Minify_Node($nodes, $attributes, $lineno, $this->getTag());
    }