}
// Setter-Methode fuer Laenge
- public function setLength ($length) {
+ public final function setLength ($length) {
if (defined('DEBUG_CORE')) $this->getDebugInstance()->output(sprintf("[%s:] <strong>%dm</strong> Länge gesetzt.<br />\n",
$this->__toString(),
$length
}
// Setter-Methode fuer Breite
- public function setWidth ($width) {
+ public final function setWidth ($width) {
if (defined('DEBUG_CORE')) $this->getDebugInstance()->output(sprintf("[%s:] <strong>%dm</strong> Breite gesetzt.<br />\n",
$this->__toString(),
$width
}
// Setter-Methode fuer Hoehe
- public function setHeight ($height) {
+ public final function setHeight ($height) {
if (defined('DEBUG_CORE')) $this->getDebugInstance()->output(sprintf("[%s:] <strong>%dm</strong> Höhe gesetzt.<br />\n",
$this->__toString(),
$height
}
// Getter-Methode fuer Laenge
- public function getLength () {
+ public final function getLength () {
if (defined('DEBUG_CORE')) $this->getDebugInstance()->output(sprintf("[%s:] Länge angefordert.<br />\n",
$this->__toString()
));
}
// Getter-Methode fuer Breite
- public function getWidth () {
+ public final function getWidth () {
if (defined('DEBUG_CORE')) $this->getDebugInstance()->output(sprintf("[%s:] Länge angefordert.<br />\n",
$this->__toString()
));
}
// Getter-Methode fuer Hoehe
- public function getHeight () {
+ public final function getHeight () {
if (defined('DEBUG_CORE')) $this->getDebugInstance()->output(sprintf("[%s:] Höhe angefordert.<br />\n",
$this->__toString()
));
}
// Setter-Methode fuer Teil-Instanz
- public function setPartInstance ($struct) {
- $this->partInstance = (Object) $struct;
+ public final function setPartInstance (ConstructableShipPart $partInstance) {
+ $this->partInstance = $partInstance;
}
// Getter-Methode fuer Teil-Instanz
- public function getPartInstance () {
+ public final function getPartInstance () {
if (!isset($this->partInstance)) {
return null;
}
return (
(
( // Already defined ship messurings
- ($this->currPart->getWidth() < $this->currShip->getWidth())
+ ($this->currPart->getWidth() < $this->currShip->getWidth())
&& ($this->currPart->getHeight() < $this->currShip->getDraught())
&& ($this->currPart->getLength() < $this->currShip->getLength())
) || ( // Ship messurings shall be calculated
- ($this->currShip->getWidth() == 0)
+ ($this->currShip->getWidth() == 0)
&& ($this->currShip->getHeight() == 0)
&& ($this->currShip->getLength() == 0)
)
// The inserted part must be messured!
) && ($this->currPart->getWidth() > 0)
- && ($this->currPart->getHeight() > 0)
- && ($this->currPart->getLength() > 0)
+ && ($this->currPart->getHeight() > 0)
+ && ($this->currPart->getLength() > 0)
);
}
));
return (
( // Already defined ship messurings
- ($this->newWidth < $this->currShip->getWidth())
+ ($this->newWidth < $this->currShip->getWidth())
&& ($this->newHeight < $this->currShip->getDraught())
&& ($this->newLength < $this->currShip->getLength())
) || ( // Ship messurings shall be calculated
- ($this->currShip->getWidth() == 0)
+ ($this->currShip->getWidth() == 0)
&& ($this->currShip->getHeight() == 0)
&& ($this->currShip->getLength() == 0)
)