protected function DomainCommands::checkDomain in Domain Access 8
Checks if a domain exists by trying to do an http request to it.
Parameters
\Drupal\domain\DomainInterface $domain: The domain to validate for syntax and uniqueness.
Return value
int The server response code for the request.
See also
domain_validate()
2 calls to DomainCommands::checkDomain()
- DomainCommands::checkHttpResponse in domain/
src/ Commands/ DomainCommands.php - Checks the domain response.
- DomainCommands::listDomains in domain/
src/ Commands/ DomainCommands.php - List active domains for the site.
File
- domain/
src/ Commands/ DomainCommands.php, line 1120
Class
- DomainCommands
- Drush commands for the domain module.
Namespace
Drupal\domain\CommandsCode
protected function checkDomain(DomainInterface $domain) {
/** @var \Drupal\domain\DomainValidatorInterface $validator */
$validator = \Drupal::service('domain.validator');
return $validator
->checkResponse($domain);
}