Changeset 173
- Timestamp:
- 03/12/07 20:34:30 (2 years ago)
- Files:
-
- trunk/classes/phing/BuildEvent.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/classes/phing/BuildEvent.php
r144 r173 44 44 45 45 /** 46 * A reference to the project47 * @var Project46 * A reference to the project 47 * @var Project 48 48 */ 49 49 protected $project; 50 50 51 51 /** 52 * A reference to the target53 * @var Target52 * A reference to the target 53 * @var Target 54 54 */ 55 55 protected $target; 56 56 57 57 /** 58 * A reference to the task58 * A reference to the task 59 59 * 60 * @var Task60 * @var Task 61 61 */ 62 62 protected $task; 63 63 64 64 /** 65 * The message of this event, if the event is a message 66 * @var string 67 * @access private 65 * The message of this event, if the event is a message 66 * @var string 68 67 */ 69 68 protected $message = null; 70 69 71 70 /** 72 * The priority of the message71 * The priority of the message 73 72 * 74 * @var string 75 * @see $message 76 * @access private 73 * @var string 74 * @see $message 77 75 */ 78 76 protected $priority = Project::MSG_VERBOSE; 79 77 80 78 /** 81 * The execption that caused the event, if any79 * The execption that caused the event, if any 82 80 * 83 * @var object 84 * @access private 81 * @var object 85 82 */ 86 83 protected $exception = null; 87 84 88 85 /** 89 * Construct a BuildEvent for a project, task or target source event86 * Construct a BuildEvent for a project, task or target source event 90 87 * 91 * @param object project the project that emitted the event. 92 * @access public 88 * @param object project the project that emitted the event. 93 89 */ 94 function __construct($source) {90 public function __construct($source) { 95 91 parent::__construct($source); 96 92 if ($source instanceof Project) { … … 112 108 113 109 /** 114 * Sets the message with details and the message priority for this event.110 * Sets the message with details and the message priority for this event. 115 111 * 116 * @param string The string message of the event117 * @param integer The priority this message should have112 * @param string The string message of the event 113 * @param integer The priority this message should have 118 114 */ 119 function setMessage($message, $priority) {115 public function setMessage($message, $priority) { 120 116 $this->message = (string) $message; 121 117 $this->priority = (int) $priority; … … 123 119 124 120 /** 125 * Set the exception that was the cause of this event.121 * Set the exception that was the cause of this event. 126 122 * 127 * @param Exception The exception that caused the event123 * @param Exception The exception that caused the event 128 124 */ 129 function setException($exception) {125 public function setException($exception) { 130 126 $this->exception = $exception; 131 127 } 132 128 133 129 /** 134 * Returns the project instance that fired this event.130 * Returns the project instance that fired this event. 135 131 * 136 * The reference to the project instance is set by the constructor if this137 * event was fired from the project class.132 * The reference to the project instance is set by the constructor if this 133 * event was fired from the project class. 138 134 * 139 * @return Project The project instance that fired this event135 * @return Project The project instance that fired this event 140 136 */ 141 function getProject() {137 public function getProject() { 142 138 return $this->project; 143 139 } 144 140 145 141 /** 146 * Returns the target instance that fired this event.142 * Returns the target instance that fired this event. 147 143 * 148 * The reference to the target instance is set by the constructor if this149 * event was fired from the target class.144 * The reference to the target instance is set by the constructor if this 145 * event was fired from the target class. 150 146 * 151 * @return object The target that fired this event 152 * @access public 147 * @return Target The target that fired this event 153 148 */ 154 function getTarget() {149 public function getTarget() { 155 150 return $this->target; 156 151 } 157 152 158 153 /** 159 * Returns the target instance that fired this event.154 * Returns the target instance that fired this event. 160 155 * 161 * The reference to the task instance is set by the constructor if this162 * event was fired within a task.156 * The reference to the task instance is set by the constructor if this 157 * event was fired within a task. 163 158 * 164 * @return object The task that fired this event 165 * @access public 159 * @return Task The task that fired this event 166 160 */ 167 function getTask() {161 public function getTask() { 168 162 return $this->task; 169 163 } 170 164 171 165 /** 172 * Returns the logging message. This field will only be set for173 * "messageLogged" events.166 * Returns the logging message. This field will only be set for 167 * "messageLogged" events. 174 168 * 175 * @return string The log message 176 * @access public 169 * @return string The log message 177 170 */ 178 171 function getMessage() { … … 181 174 182 175 /** 183 * Returns the priority of the logging message. This field will only184 * be set for "messageLogged" events.176 * Returns the priority of the logging message. This field will only 177 * be set for "messageLogged" events. 185 178 * 186 * @return integer The message priority 187 * @access public 179 * @return integer The message priority 188 180 */ 189 181 function getPriority() { … … 192 184 193 185 /** 194 * Returns the exception that was thrown, if any.195 * This field will only be set for "taskFinished", "targetFinished", and196 * "buildFinished" events.186 * Returns the exception that was thrown, if any. 187 * This field will only be set for "taskFinished", "targetFinished", and 188 * "buildFinished" events. 197 189 * 198 * @see BuildListener::taskFinished() 199 * @see BuildListener::targetFinished() 200 * @see BuildListener::buildFinished() 190 * @see BuildListener::taskFinished() 191 * @see BuildListener::targetFinished() 192 * @see BuildListener::buildFinished() 193 * @return Exception 201 194 */ 202 function getException() {195 public function getException() { 203 196 return $this->exception; 204 197 }
