public function checkDomain(Route $route, $host) { $regexp = $route->getDomain(); if (!$regexp) { return true; } return preg_match('~^' . $regexp . '$~', $host); }