Annotation of FreeBSD/tinderbox/webui/core/Port.php, revision 1.1.1.1.2.1
1.1 as 1: <?php
2: #-
3: # Copyright (c) 2004-2007 FreeBSD GNOME Team <freebsd-gnome@FreeBSD.org>
4: # All rights reserved.
5: #
6: # Redistribution and use in source and binary forms, with or without
7: # modification, are permitted provided that the following conditions
8: # are met:
9: # 1. Redistributions of source code must retain the above copyright
10: # notice, this list of conditions and the following disclaimer.
11: # 2. Redistributions in binary form must reproduce the above copyright
12: # notice, this list of conditions and the following disclaimer in the
13: # documentation and/or other materials provided with the distribution.
14: #
15: # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16: # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17: # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18: # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19: # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20: # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21: # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22: # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23: # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24: # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25: # SUCH DAMAGE.
26: #
1.1.1.1.2.1! as 27: # $Paefchen$
1.1 as 28: # $MCom: portstools/tinderbox/webui/core/Port.php,v 1.5 2007/06/09 22:09:12 marcus Exp $
29: #
30:
1.1.1.1.2.1! as 31: class Port extends TinderObject {
1.1 as 32:
1.1.1.1.2.1! as 33: public function __construct($argv = array()) {
! 34: $object_hash = array(
! 35: 'build_id' => '',
! 36: 'port_id' => '',
! 37: 'port_name' => '',
! 38: 'port_directory' => '',
! 39: 'port_comment' => '',
! 40: 'port_maintainer' => '',
! 41: 'currently_building' => '',
! 42: 'last_built' => '',
! 43: 'last_status' => '',
! 44: 'last_successful_built' => '',
! 45: 'last_built_version' => '',
! 46: 'last_failed_dependency' => '',
! 47: 'last_run_duration' => '',
! 48: 'last_fail_reason' => ''
! 49: );
1.1 as 50:
1.1.1.1.2.1! as 51: parent::__construct($object_hash, $argv);
! 52: }
! 53:
! 54: public function getBuildId() {
! 55: return $this->build_id;
! 56: }
1.1 as 57:
1.1.1.1.2.1! as 58: public function getId() {
1.1 as 59: return $this->port_id;
60: }
61:
1.1.1.1.2.1! as 62: public function getName() {
1.1 as 63: return $this->port_name;
64: }
65:
1.1.1.1.2.1! as 66: public function getDirectory() {
1.1 as 67: return $this->port_directory;
68: }
69:
1.1.1.1.2.1! as 70: public function getComment() {
1.1 as 71: return $this->port_comment;
72: }
73:
1.1.1.1.2.1! as 74: public function getMaintainer() {
1.1 as 75: return $this->port_maintainer;
76: }
77:
1.1.1.1.2.1! as 78: public function getCurrentlyBuilding() {
1.1 as 79: return $this->_truth_array[$this->currently_building];
80: }
81:
1.1.1.1.2.1! as 82: public function getLastBuilt() {
1.1 as 83: return $this->last_built;
84: }
85:
1.1.1.1.2.1! as 86: public function getLastStatus() {
1.1 as 87: return $this->last_status;
88: }
89:
1.1.1.1.2.1! as 90: public function getLastSuccessfulBuilt() {
1.1 as 91: return $this->last_successful_built;
92: }
93:
1.1.1.1.2.1! as 94: public function getLastBuiltVersion() {
1.1 as 95: return $this->last_built_version;
96: }
97:
1.1.1.1.2.1! as 98: public function getLastFailReason() {
1.1 as 99: return $this->last_fail_reason;
100: }
101:
1.1.1.1.2.1! as 102: public function getLastFailedDep() {
1.1 as 103: return $this->last_failed_dependency;
104: }
105:
1.1.1.1.2.1! as 106: public function getLastRunDuration() {
1.1 as 107: return $this->last_run_duration;
108: }
109:
1.1.1.1.2.1! as 110: public function getLogfileName() {
1.1 as 111: return $this->getLastBuiltVersion() . ".log";
112: }
113:
1.1.1.1.2.1! as 114: public function setName($name) {
1.1 as 115: $this->port_name = $name;
116: }
117:
1.1.1.1.2.1! as 118: public function setDirectory($dir) {
1.1 as 119: $this->port_directory = $dir;
120: }
121:
1.1.1.1.2.1! as 122: public function setComment($comment) {
1.1 as 123: $this->port_comment = $comment;
124: }
125:
1.1.1.1.2.1! as 126: public function setMaintainer($maintainer) {
1.1 as 127: $this->port_maintainer = $maintainer;
128: }
1.1.1.1.2.1! as 129: }
1.1 as 130:
131: ?>