| <?php |
| /** |
| * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (http://www.eclipse.org/legal/epl-v10.html). |
| * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. |
| * |
| */ |
| |
| |
| /* |
| * Created on 15/12/2005 |
| * |
| * Eduardo A. Romero Gomez |
| * eromero@openmex.com |
| * http://www.openmex.com |
| */ |
| |
| /** |
| * The Release object models a release |
| * |
| * It has a <b>name</b>, like 2.6.14-rc5 and a <b>date</b> for the release |
| * |
| * A <b>status</b>, which can be "completed", "scheduled" or "tentative". |
| * |
| * There's also the <b>download url</b> which is the place to fetch it and |
| * and the release <b>plan url</b>. |
| * |
| * @license http://www.eclipse.org/legal/epl-v10.html Eclipse Public License - v 1.0 |
| * @author Eduardo A. Romero Gomez |
| */ |
| class Release |
| { |
| |
| var $name = ""; |
| var $date = ""; |
| var $status = ""; |
| var $download = ""; |
| var $plan = ""; |
| |
| /** |
| * Constructor |
| * |
| * Creates a new Release object, useful when trying to model a release. |
| * |
| * @param string $name The name of the release, i.e. 2.6.14-rc5 |
| * @param string $date date of the release, it can be in any of this formats: DD/MM/YYYY or MM/YYYY or NQYYY |
| * @param string $status The status of the release can be "completed", "scheduled" or "tentative" |
| * @param string $download The URL where you can grab the release |
| * @param string $plan The Plan of the Release |
| * |
| * @return Release a brand new Release object. |
| */ |
| function Release($name = "", $date = "", $status ="", $download = "", $plan = "" ){ |
| $this->name = $name; |
| $this->date = $date; |
| $this->status = $status; |
| $this->download = $download; |
| $this->plan = $plan; |
| } |
| |
| /** |
| * Sets the name of the release |
| * |
| * @access public |
| * @param string The <i>name</i> of the release |
| */ |
| function setName($name) |
| { |
| $this->name = $name; |
| } |
| |
| /** |
| * Sets the date of the release |
| * |
| * @access public |
| * @param string <i>date</i>: DD/MM/YYYY or MM/YYYY or NQYYY |
| */ |
| function setDate($date) |
| { |
| $this->date = $date; |
| } |
| |
| /** |
| * Sets the status of the release |
| * |
| * @access public |
| * @param string <i>status</i>: "complete","scheduled" or "tentative" |
| */ |
| function setStatus($status) |
| { |
| $this->status = $status; |
| } |
| |
| /** |
| * Sets the download url to fetch the release |
| * |
| * @access public |
| * @param string The <i>url</i> to download the release |
| */ |
| function setDownload($url) |
| { |
| $this->download = $url; |
| } |
| |
| /** |
| * Sets the url to check the plan of the release |
| * |
| * @access public |
| * @param string The <i>url</i> of the plan of this release |
| */ |
| function setPlan($url) |
| { |
| $this->plan = $url; |
| } |
| |
| /** |
| * Returns the name of the release |
| * |
| * @access public |
| * @return string The name of the release |
| */ |
| function getName() |
| { |
| return $this->name; |
| } |
| |
| /** |
| * Returns the date of the release |
| * |
| * @access public |
| * @return string The date of the release |
| */ |
| function getDate() |
| { |
| return $this->date; |
| } |
| |
| /** |
| * Returns the status of the release |
| * |
| * @access public |
| * @return string The status of the release |
| */ |
| function getStatus() |
| { |
| return $this->status; |
| } |
| |
| /** |
| * Returns the URL of the release download |
| * |
| * @access public |
| * @return string The url to download the release |
| */ |
| function getDownload() |
| { |
| return $this->download; |
| } |
| |
| /** |
| * Returns the URL of the plan for the release |
| * |
| * @access public |
| * @return string The url of plan of this release |
| */ |
| function getPlan() |
| { |
| return $this->plan; |
| } |
| |
| } |
| |
| ?> |