From: Roland Häder Date: Sat, 8 Mar 2008 12:18:03 +0000 (+0000) Subject: interface added to setter X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=11b9e7041042e18726f3bab18be8a9de2225338b;p=shipsimu.git interface added to setter --- diff --git a/application/ship-simu/main/class_BaseSimulator.php b/application/ship-simu/main/class_BaseSimulator.php index 4726d29..a63ce11 100644 --- a/application/ship-simu/main/class_BaseSimulator.php +++ b/application/ship-simu/main/class_BaseSimulator.php @@ -62,7 +62,7 @@ class BaseSimulator extends BaseFrameworkSystem { } // Setter-Methode fuer Laenge - public function setLength ($length) { + public final function setLength ($length) { if (defined('DEBUG_CORE')) $this->getDebugInstance()->output(sprintf("[%s:] %dm Länge gesetzt.
\n", $this->__toString(), $length @@ -71,7 +71,7 @@ class BaseSimulator extends BaseFrameworkSystem { } // Setter-Methode fuer Breite - public function setWidth ($width) { + public final function setWidth ($width) { if (defined('DEBUG_CORE')) $this->getDebugInstance()->output(sprintf("[%s:] %dm Breite gesetzt.
\n", $this->__toString(), $width @@ -80,7 +80,7 @@ class BaseSimulator extends BaseFrameworkSystem { } // Setter-Methode fuer Hoehe - public function setHeight ($height) { + public final function setHeight ($height) { if (defined('DEBUG_CORE')) $this->getDebugInstance()->output(sprintf("[%s:] %dm Höhe gesetzt.
\n", $this->__toString(), $height @@ -89,7 +89,7 @@ class BaseSimulator extends BaseFrameworkSystem { } // Getter-Methode fuer Laenge - public function getLength () { + public final function getLength () { if (defined('DEBUG_CORE')) $this->getDebugInstance()->output(sprintf("[%s:] Länge angefordert.
\n", $this->__toString() )); @@ -97,7 +97,7 @@ class BaseSimulator extends BaseFrameworkSystem { } // Getter-Methode fuer Breite - public function getWidth () { + public final function getWidth () { if (defined('DEBUG_CORE')) $this->getDebugInstance()->output(sprintf("[%s:] Länge angefordert.
\n", $this->__toString() )); @@ -105,7 +105,7 @@ class BaseSimulator extends BaseFrameworkSystem { } // Getter-Methode fuer Hoehe - public function getHeight () { + public final function getHeight () { if (defined('DEBUG_CORE')) $this->getDebugInstance()->output(sprintf("[%s:] Höhe angefordert.
\n", $this->__toString() )); @@ -113,12 +113,12 @@ class BaseSimulator extends BaseFrameworkSystem { } // 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; } @@ -335,18 +335,18 @@ class BaseSimulator extends BaseFrameworkSystem { 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) ); } @@ -357,11 +357,11 @@ class BaseSimulator extends BaseFrameworkSystem { )); 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) )