public function executeHook(Dictionary $params)
    {
        $responder = $params['responder'] ?? null;
        $mime = $params['mime'] ?? null;

        $result = empty($responder) ? null : $responder->getResult();
        $response = empty($result) ? null : $result->getResponse();

        if ($response instanceof HTTPError)
            $response = $response->getResponse();

        if ($response instanceof StringResponse && $mime === "text/html")
        {
            $output = $response->getOutput($mime);
            $output = $this->replaceTokens($output);
            $response->setOutput($output, $mime);
        }
    }
public function executeHook(Dictionary $params)
    {
        $responder = $params['responder'] ?? null;
        $mime = $params['mime'] ?? null;

        $result = empty($responder) ? null : $responder->getResult();
        $response = empty($result) ? null : $result->getResponse();

        if ($response instanceof HTTPError)
            $response = $response->getResponse();

        if ($response instanceof StringResponse && $mime === "text/html")
        {
            $output = $response->getOutput($mime);
            $output = $this->replaceTokens($output);
            $response->setOutput($output, $mime);
        }
    }
public function executeHook ( Dictionary $ params ) { $ responder = $ params [ 'responder' ] ?? null ; $ mime = $ params [ 'mime' ] ?? null ; $ result = empty ( $ responder ) ? null : $ responder -> getResult ( ) ; $ response = empty ( $ result ) ? null : $ result -> getResponse ( ) ; if ( $ response instanceof HTTPError ) $ response = $ response -> getResponse ( ) ; if ( $ response instanceof StringResponse && $ mime === "text/html" ) { $ output = $ response -> getOutput ( $ mime ) ; $ output = $ this -> replaceTokens ( $ output ) ; $ response -> setOutput ( $ output , $ mime ) ; } }
Execute the hook to replace the Javascript and CSS tokens in the HTTP Responder. This will
be called by Wedeto\Util\Hook through Wedeto\HTTP. It can be called directly
when you want to replace the content at a different time.

@param Dictionary $params The parameters. Should contain a key 'response' and 'mime'. The res
Execute the hook to replace the Javascript and CSS tokens in the HTTP Responder . This will be called by Wedeto \ Util \ Hook through Wedeto \ HTTP . It can be called directly when you want to replace the content at a different time .