/** * @return array */ static function getSectionsFromNet() { $sections = []; $contents = Helpers\FakeBrowser::get(Config::get('maltapark.url')); if (!$contents) { return []; } $matches = Helpers\RegExp::getAllMatch(Config::get('maltapark.categoryRegexp'), $contents); for ($i = 0; $i < count($matches[1]); $i++) { $sections[] = new Section($matches[1][$i], $matches[2][$i]); } return $sections; }