Deutschland United States United Kingdom
ContentLion - Open Source CMS

internalcompilenocacheclose.php

Blame | Last modification | View Log

<?php

/**
 * Smarty Internal Plugin Compile Nocacheclose Class
 *
 * @package Smarty
 * @subpackage Compiler
 */

class Plugin_Smarty_InternalCompileNocacheclose extends Plugin_Smarty_InternalCompileBase
{
    /**
     * Compiles code for the {/nocache} tag
     *
     * This tag does not generate compiled output. It only sets a compiler flag.
     *
     * @param  array  $args     array with attributes from parser
     * @param  object $compiler compiler object
     * @return bool
     */

    public function compile($args, $compiler)
    {
        $_attr = $this->getAttributes($compiler, $args);
        if ($compiler->template->caching) {
        // restore old nocache mode
        $compiler->nocache = $this->closeTag($compiler, 'nocache');
        }
        // this tag does not return compiled code
        $compiler->has_code = false;

        return true;
    }

}