blob: bab133718a020ae3e1b8594fbc0b0246dca9e2fd [file] [log] [blame]
atoulme425b6c82008-11-24 14:00:27 +00001<?php
2/*******************************************************************************
3 * Copyright (c) 2007-2008 Eclipse Foundation and others.
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * which accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
8 *
9 * Contributors:
10 * Antoine Toulme, Intalio Inc. bug 248845: Refactoring generate1.php into different files with a functional approach
11*******************************************************************************/
12
13class ReleaseTrain {
14
15 public $id = '';
16 public $version = '';
atoulmecab9de92008-11-24 15:04:02 +000017 public $timestamp = '';
atoulme425b6c82008-11-24 14:00:27 +000018
19 /**
20 * Default constructor for now.
21 **/
22 function ReleaseTrain($id) {
23 $this->id = $id;
24 $this->version = "3.4.0";
25 if (strcmp($id, "europa") == 0) {
26 $this->version = "3.3.0";
27 }
atoulmecab9de92008-11-24 15:04:02 +000028 $this->timestamp = date("Ymdhis");
atoulme425b6c82008-11-24 14:00:27 +000029 }
30
31 static function all() {
32 $trains = array();
33 $train_result = mysql_query("SELECT DISTINCT train_id FROM release_train_projects");
34 while (($train_row = mysql_fetch_assoc($train_result)) != null) {
35 $trains[] = new ReleaseTrain($train_row['train_id']);
36 }
37 return $trains;
38 }
39
40}