You are here

protected function W3CValidatorOperationForm::isRateLimitService in W3C Validator 8

Checks if service belong to a known rate limited service.

Parameters

string $service: The service name.

Return value

bool true/false if the service is know to have a rate limit.

1 call to W3CValidatorOperationForm::isRateLimitService()
W3CValidatorOperationForm::buildForm in src/Form/W3CValidatorOperationForm.php
Form constructor.

File

src/Form/W3CValidatorOperationForm.php, line 140

Class

W3CValidatorOperationForm
Provides the operation form on report page.

Namespace

Drupal\w3c_validator\Form

Code

protected function isRateLimitService($service) {
  $services = [
    'validator.nu',
    'validator.w3.org',
  ];
  return in_array(parse_url($service, PHP_URL_HOST), $services);
}