Stash::final_output PHP Méthode

final_output() public méthode

Final parsing/cleanup of template tagdata before output
public final_output ( $output = '' ) : string
Résultat string
    public function final_output($output = '')
    {
        // is nocache disabled?
        if (!self::$_nocache) {
            // yes - let's remove any {[prefix]:nocache} tags from the final output
            $strip = $this->EE->TMPL->fetch_param('strip', FALSE);
            if ($strip) {
                $strip = explode('|', $strip);
            } else {
                $strip = array();
            }
            foreach (self::$_nocache_prefixes as $prefix) {
                $strip[] = $prefix . $this->_nocache_suffix;
            }
            $this->EE->TMPL->tagparams['strip'] = implode('|', $strip);
        }
        // Do string transformations
        $output = $this->_clean_string($output);
        // set as template tagdata
        $this->EE->TMPL->tagdata = $output;
        // remove the placeholder from the output
        return $this->EE->TMPL->tagdata;
    }