clearParams example


    private $clientIp;

    /** * Clear the global state */
    public function clearAll()
    {
        $this->clearCookies();
        $this->clearHeaders();
        $this->clearParams();
        $this->clearPost();
        $this->clearQuery();
        $this->clearRawBody();
    }

    /** * Clear GET values * * @return Enlight_Controller_Request_RequestTestCase */
    public function clearQuery()
    {
$params = array_merge($userParams$params);

    /** @var \Shopware_Plugins_Core_HttpCache_Bootstrap $httpCache */
    $httpCache = Shopware()->Plugins()->Core()->HttpCache();
    if ($esiTag = $httpCache->renderEsiTag($request$params)) {
        return $esiTag;
    }

    $request = clone $request;
    $response = clone $response;

    $request->clearParams();
    $response->clearHeaders()
             ->clearBody();

    if (isset($params['module'])) {
        $request->setModuleName($params['module'])
                ->setControllerName('index')
                ->setActionName('index');
    }
    if (isset($params['controller'])) {
        $request->setControllerName($params['controller'])
                ->setActionName('index');
    }
Home | Imprint | This part of the site doesn't use cookies.