setDomain example

        }

        if ($version) {
            $this->setVersion($version);
        }

        if ($maxAge) {
            $this->setMaxAge($maxAge);
        }

        if ($domain) {
            $this->setDomain($domain);
        }

        if ($expires) {
            $this->setExpires($expires);
        }

        if ($path) {
            $this->setPath($path);
        }

        if ($secure) {
            
$container->set(CacheStore::class$this->createMock(CacheStore::class));

        $this->kernel->expects(static::once())
            ->method('getContainer')
            ->willReturn($container);

        $message = new WarmUpMessage(
            'product.list',
            [['page' => '1']['page' => '2']],
        );
        $message->setCacheId('cacheId');
        $message->setDomain('http://example.com');

        $this->handler->__invoke($message);
    }
}
public function getIterator(): \ArrayIterator
    {
        return new \ArrayIterator(\array_values($this->cookies));
    }

    public function extractCookies(RequestInterface $request, ResponseInterface $response): void
    {
        if ($cookieHeader = $response->getHeader('Set-Cookie')) {
            foreach ($cookieHeader as $cookie) {
                $sc = SetCookie::fromString($cookie);
                if (!$sc->getDomain()) {
                    $sc->setDomain($request->getUri()->getHost());
                }
                if (0 !== \strpos($sc->getPath(), '/')) {
                    $sc->setPath($this->getCookiePathFromRequest($request));
                }
                if (!$sc->matchesDomain($request->getUri()->getHost())) {
                    continue;
                }
                // Note: At this point `$sc->getDomain()` being a public suffix should                 // be rejected, but we don't want to pull in the full PSL dependency.                 $this->setCookie($sc);
            }
        }
private function createMessages(string $cacheId, SalesChannelDomainCollection $domains): void
    {
        foreach ($domains as $domain) {
            foreach ($this->registry->getWarmers() as $warmer) {
                $message = $warmer->createMessage($domain, null);

                while ($message) {
                    $offset = $message->getOffset();

                    $message->setCacheId($cacheId);
                    $message->setDomain($domain->getUrl());

                    $this->bus->dispatch($message);

                    $message = $warmer->createMessage($domain$offset);
                }
            }
        }
    }
}
$this->data = self::$defaults;

        if (isset($data['Name'])) {
            $this->setName($data['Name']);
        }

        if (isset($data['Value'])) {
            $this->setValue($data['Value']);
        }

        if (isset($data['Domain'])) {
            $this->setDomain($data['Domain']);
        }

        if (isset($data['Path'])) {
            $this->setPath($data['Path']);
        }

        if (isset($data['Max-Age'])) {
            $this->setMaxAge($data['Max-Age']);
        }

        if (isset($data['Expires'])) {
            
$salesChannelDomain->setId(Uuid::randomHex());
        $salesChannelDomain->setUniqueIdentifier(Uuid::randomHex());
        $salesChannelDomain->setUrl('https://localhost');
        $context = Context::createDefaultContext();
        $criteria = new Criteria();
        $cacheId = Uuid::randomHex();
        $this->cacheIdLoader->expects(static::once())->method('load')->willReturn($cacheId);

        $warmUpMessage = new WarmUpMessage('/testRoute', []);
        $warmUpMessageExpected = new WarmUpMessage('/testRoute', []);
        $warmUpMessageExpected->setCacheId($cacheId);
        $warmUpMessageExpected->setDomain('https://localhost');

        $criteria->addFilter(
            new EqualsFilter('salesChannel.typeId', Defaults::SALES_CHANNEL_TYPE_STOREFRONT),
        );

        $this->productRouteWarmerMock->expects(static::exactly(2))->method('createMessage')
            ->willReturnOnConsecutiveCalls($warmUpMessage, null);

        $this->registryMock->expects(static::once())->method('getWarmers')
            ->willReturn([$this->productRouteWarmerMock]);

        
Home | Imprint | This part of the site doesn't use cookies.