private function setup()
{
if ($this->started) {
return;
}
if ($this->app['extend.writeable']) {
// Do required JSON update/set up
try {
$this->updateJson();
} catch (ParseException $e) {
$this->app['logger.flash']->danger(Trans::__('Error reading extensions/composer.json file: %ERROR%', ['%ERROR%' => $e->getMessage()]));
$this->started = false;
return;
}
// Ping the extensions server to confirm connection
$this->ping(true);
}
$this->started = true;
}