/** * Get all builds for a specific edition * * @param integer $edition_id The edition ID * * @return array */ public static function getByEditionID($edition_id) { if (self::$_edition_builds === null) { self::$_edition_builds = array(); } if (!array_key_exists($edition_id, self::$_edition_builds)) { self::$_edition_builds[$edition_id] = array(); if ($res = B2DB::getTable('TBGBuildsTable')->getByEditionID($project_id)) { $build = TBGContext::factory()->TBGBuild($row->get(TBGBuildsTable::ID), $row); self::$_edition_builds[$edition_id][$build->getID()] = $build; } } return self::$_edition_builds[$edition_id]; }