/** * * Use StatusSync to dynamically add the available * data urls to poll new data from * @param \Vatsimphp\Sync\StatusSync $sync * @param string $type - the type of urls to use (ie dataUrls) * @throws \Vatsimphp\Exception\RuntimeException */ public function registerUrlFromStatus(\Vatsimphp\Sync\StatusSync $sync, $type) { $urls = $sync->loadData()->get($type)->toArray(); if (empty($urls)) { throw new RuntimeException('Error loading urls from StatusSync'); } $this->registerUrl($urls, true); return true; }