PHPFusion\OutputHandler::handleOutput PHP Метод

handleOutput() публичный статический Метод

Execute the output handlers
public static handleOutput ( string $output ) : string
$output string
Результат string
    public static function handleOutput($output)
    {
        $settings = \fusion_get_settings();
        if (!empty(self::$pageHeadTags)) {
            $output = preg_replace("#</head>#", self::$pageHeadTags . "</head>", $output, 1);
        }
        if (self::$pageTitle) {
        }
        if (self::$pageTitle != $settings['sitename']) {
            $output = preg_replace("#<title>.*</title>#i", "<title>" . self::$pageTitle . (self::$pageTitle ? $GLOBALS['locale']['global_200'] : '') . $settings['sitename'] . "</title>", $output, 1);
        }
        if (!empty(self::$pageMeta)) {
            foreach (self::$pageMeta as $name => $content) {
                $output = preg_replace("#<meta (http-equiv|name)='{$name}' content='.*' />#i", "<meta \\1='" . $name . "' content='" . $content . "' />", $output, 1);
            }
        }
        foreach (self::$outputHandlers as $handler) {
            $output = $handler($output);
        }
        return $output;
    }

Usage Example

/**
 * Execute the output handlers
 *
 * @param string $output
 * @return string
 */
function handle_output($output)
{
    return OutputHandler::handleOutput($output);
}