private function getManifest()
{
if (!isset($this->manifest)) {
$context = stream_context_create(['http' => ['timeout' => $this->manifestTimeout]]);
$manifestContents = file_get_contents($this->manifestUrl, false, $context);
if ($manifestContents === false) {
throw new \RuntimeException(sprintf('Failed to download manifest: %s', $this->manifestUrl));
}
$this->manifest = (array) json_decode($manifestContents, true);
if (json_last_error() !== JSON_ERROR_NONE) {
throw new JsonParsingException('Error parsing manifest file' . (function_exists('json_last_error_msg') ? ': ' . json_last_error_msg() : ''));
}
}
return $this->manifest;
}