protected function DeployServiceRest::fetchContext in Deploy - Content Staging 7.3
Same name and namespace in other branches
- 7.2 includes/DeployServiceRest.inc \DeployServiceRest::fetchContext()
Fetches the context for the HTTP request.
Return value
resource The stream context resource.
See also
2 calls to DeployServiceRest::fetchContext()
- DeployRemoteCcServiceRestJSON::getContext in modules/
deploy_remote_cc/ plugins/ DeployRemoteCcServiceRestJSON.inc - Provides access to the context to be able to use it elsewhere.
- DeployServiceRest::__construct in includes/
DeployServiceRest.inc - Constructor for a service plugin.
File
- includes/
DeployServiceRest.inc, line 113 - Implementation of a REST based client for deploying entities.
Class
- DeployServiceRest
- Base class for REST-based service plugins.
Code
protected function fetchContext() {
$verify_ssl = variable_get('deploy_verify_ssl', TRUE);
$context_options = array(
'ssl' => array(
'verify_peer' => $verify_ssl,
'verify_peer_name' => $verify_ssl,
'allow_self_signed' => !$verify_ssl,
),
);
$context = stream_context_create($context_options);
return $context;
}