Skip to content
Snippets Groups Projects
Commit ac6552da authored by Ivan Tsekhmistro's avatar Ivan Tsekhmistro
Browse files

Make negotiateActiveDomain a protected method. Reset domain on onKernelRequestDomain

parent 2d731df6
No related branches found
No related tags found
No related merge requests found
......@@ -102,9 +102,9 @@ class DomainNegotiator implements DomainNegotiatorInterface {
}
/**
* {@inheritdoc}
* Determine the active domain.
*/
public function negotiateActiveDomain() {
protected function negotiateActiveDomain() {
$httpHost = $this->negotiateActiveHostname();
$this->setRequestDomain($httpHost);
return $this->domain;
......
......@@ -24,11 +24,6 @@ interface DomainNegotiatorInterface {
*/
public function setActiveDomain(DomainInterface $domain);
/**
* Gets the active domain.
*/
public function negotiateActiveDomain();
/**
* Stores the inbound httpHost request.
*/
......
......@@ -60,7 +60,7 @@ class DomainSubscriber implements EventSubscriberInterface {
*/
public function onKernelRequestDomain(GetResponseEvent $event) {
$redirect = FALSE;
if ($domain = $this->domainNegotiator->getActiveDomain()) {
if ($domain = $this->domainNegotiator->getActiveDomain(TRUE)) {
$domain_url = $domain->getUrl();
if ($domain_url) {
$redirect_type = $domain->getRedirect();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment