public function getDistributionConfig($distributionId)
{
$result = null;
$options = array();
$response = $this->client->call('GET', $options, sprintf('/distribution/%s/config', self::escape($distributionId)));
if ($response->getError() === false) {
$sxml = simplexml_load_string($response->getRawContent());
$result = $this->_loadDistributionConfigData($sxml);
$result->setOriginalXml($response->getRawContent());
$result->setETag($response->getHeader('ETag'));
$entity = $this->cloudFront->distribution->get((string) $distributionId);
if ($entity !== null) {
//Refreshes config for the distribution object if it does exist in the storage.
$entity->distributionConfig = $result;
}
}
return $result;
}