function install_check_localization_server
install_check_localization_server($uri)
Checks if the localization server can be contacted.
Parameters
string $uri: The URI to contact.
Return value
string TRUE if the URI was contacted successfully, FALSE if not.
File
- core/includes/install.core.inc, line 1389
- API functions for installing Drupal.
Code
function install_check_localization_server($uri) { try { \Drupal::httpClient()->head($uri); return TRUE; } catch (RequestException $e) { return FALSE; } }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!includes!install.core.inc/function/install_check_localization_server/8.1.x