private function HtmlAssetInliner::applySettingsToCurl in TMGMT Translator Smartling 8.2
Same name and namespace in other branches
- 8.4 src/Context/HtmlAssetInliner.php \Drupal\tmgmt_smartling\Context\HtmlAssetInliner::applySettingsToCurl()
- 8.3 src/Context/HtmlAssetInliner.php \Drupal\tmgmt_smartling\Context\HtmlAssetInliner::applySettingsToCurl()
Parameters
$proj_settings:
$curl:
2 calls to HtmlAssetInliner::applySettingsToCurl()
- HtmlAssetInliner::getUrlContents in src/
Context/ HtmlAssetInliner.php - Gets content for given url using curl and optionally using user agent
- HtmlAssetInliner::remote_file_exists in src/
Context/ HtmlAssetInliner.php - Checks whether or not remote file exists
File
- src/
Context/ HtmlAssetInliner.php, line 217
Class
Namespace
Drupal\tmgmt_smartling\ContextCode
private function applySettingsToCurl($proj_settings, $curl) {
if (!empty($proj_settings['context_skip_host_verifying'])) {
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, FALSE);
}
if (!empty($proj_settings['enable_basic_auth'])) {
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($curl, CURLOPT_USERPWD, $proj_settings['basic_auth']['login'] . ':' . $proj_settings['basic_auth']['password']);
}
}