blob: bba86079fd9dab9ad81f4c58d93af171fba5214e [file] [log] [blame]
<?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 Shipping object models a <b>completed release</b>
*
* It has a <b>name</b>, like <i>2.6.14-rc5</i>
* a <b>date</b> and the <b>download url</b> which is the place to fetch it.
*
* @license http://www.eclipse.org/legal/epl-v10.html Eclipse Public License - v 1.0
* @author Eduardo A. Romero Gomez
*/
class Shipping
{
var $name = "";
var $date = "";
var $download = "";
/**
* Constructor
*
* Creates a new Shipping 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 $download The URL where you can grab the release
*
* @return Shipping a brand new Release object.
*/
function Shipping($name = "", $date = "", $download = ""){
$this->download = $download;
if($name == "")
$name = $download;
$this->name = $name;
$this->date = $date;
}
function Ships($name = "", $date = "", $download = ""){
$this->download = $download;
if($name == "")
$name = $download;
$this->name = $name;
$this->date = $date;
}
/**
* Sets the name of the shipping release
*
* @access public
* @param string The <i>name</i> of the release
*/
function setName($name)
{
$this->name = $name;
}
/**
* Sets the date of the shipping release
*
* @access public
* @param string <i>date</i>: DD/MM/YYYY or MM/YYYY or NQYYY
*/
function setDate($date)
{
$this->date = $date;
}
/**
* Sets the download url to fetch the shipping release
*
* @access public
* @param string The download <i>url</i> of the release
*/
function setDownload($url)
{
$this->download = $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 URL of the release download
*
* @access public
* @return string The url to download the release
*/
function getDownload()
{
return $this->download;
}
/**
* Returns the Status of the release
*
* @access public
* @return string "completed"
*/
function getStatus()
{
return "completed";
}
}
?>