protected function fetchPackageJson()
{
$extensionJson = @file_get_contents('http://localhost:8080/json/' . $this->name . '.json');
if (!$extensionJson) {
$status = isset($http_response_header[0]) ? $http_response_header[0] : "";
if (strpos($status, '404') !== false) {
throw new \Exception("cannot find {$this->name}");
} else {
if ($status) {
throw new \Exception("http error while loading informatio for {$this->name}: " . $status);
} else {
throw new \Exception("http error while loading informatio for {$this->name}: unknown error");
}
}
}
return json_decode($extensionJson, true);
}