--- FreeBSD/tinderbox/webui/core/Port.php 2007/11/02 20:56:34 1.1 +++ FreeBSD/tinderbox/webui/core/Port.php 2007/11/09 22:56:45 1.1.1.1.2.1 @@ -24,110 +24,108 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # +# $Paefchen$ # $MCom: portstools/tinderbox/webui/core/Port.php,v 1.5 2007/06/09 22:09:12 marcus Exp $ # - require_once 'TinderObject.php'; +class Port extends TinderObject { - class Port extends TinderObject { + public function __construct($argv = array()) { + $object_hash = array( + 'build_id' => '', + 'port_id' => '', + 'port_name' => '', + 'port_directory' => '', + 'port_comment' => '', + 'port_maintainer' => '', + 'currently_building' => '', + 'last_built' => '', + 'last_status' => '', + 'last_successful_built' => '', + 'last_built_version' => '', + 'last_failed_dependency' => '', + 'last_run_duration' => '', + 'last_fail_reason' => '' + ); - function Port($argv = array()) { - $object_hash = array( - 'build_id' => '', - 'port_id' => '', - 'port_name' => '', - 'port_directory' => '', - 'port_comment' => '', - 'port_maintainer' => '', - 'currently_building' => '', - 'last_built' => '', - 'last_status' => '', - 'last_successful_built' => '', - 'last_built_version' => '', - 'last_failed_dependency' => '', - 'last_run_duration' => '', - 'last_fail_reason' => '' - ); - - $this->TinderObject($object_hash, $argv); + parent::__construct($object_hash, $argv); } - function getBuildId() { - return $this->build_id; - } + public function getBuildId() { + return $this->build_id; + } - function getId() { + public function getId() { return $this->port_id; } - function getName() { + public function getName() { return $this->port_name; } - function getDirectory() { + public function getDirectory() { return $this->port_directory; } - function getComment() { + public function getComment() { return $this->port_comment; } - function getMaintainer() { + public function getMaintainer() { return $this->port_maintainer; } - function getCurrentlyBuilding() { + public function getCurrentlyBuilding() { return $this->_truth_array[$this->currently_building]; } - function getLastBuilt() { + public function getLastBuilt() { return $this->last_built; } - function getLastStatus() { + public function getLastStatus() { return $this->last_status; } - function getLastSuccessfulBuilt() { + public function getLastSuccessfulBuilt() { return $this->last_successful_built; } - function getLastBuiltVersion() { + public function getLastBuiltVersion() { return $this->last_built_version; } - function getLastFailReason() { + public function getLastFailReason() { return $this->last_fail_reason; } - function getLastFailedDep() { + public function getLastFailedDep() { return $this->last_failed_dependency; } - function getLastRunDuration() { + public function getLastRunDuration() { return $this->last_run_duration; } - function getLogfileName() { + public function getLogfileName() { return $this->getLastBuiltVersion() . ".log"; } - function setName($name) { + public function setName($name) { $this->port_name = $name; } - function setDirectory($dir) { + public function setDirectory($dir) { $this->port_directory = $dir; } - function setComment($comment) { + public function setComment($comment) { $this->port_comment = $comment; } - function setMaintainer($maintainer) { + public function setMaintainer($maintainer) { $this->port_maintainer = $maintainer; } +} - - } ?>