X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=application%2Fship-simu%2Fmain%2Fclass_WorksContract.php;h=cd2f0450937712276cd6003454b166802fa0e11a;hb=3d9c48e0066be8f20fa08f8517f9cbb943504de5;hp=aaa597fdb1ee6ac3cc67a4fa18cd0f0fa192b782;hpb=87c949b6948ffa6fa7aa3c1701888b20f86de6ce;p=shipsimu.git
diff --git a/application/ship-simu/main/class_WorksContract.php b/application/ship-simu/main/class_WorksContract.php
index aaa597f..cd2f045 100644
--- a/application/ship-simu/main/class_WorksContract.php
+++ b/application/ship-simu/main/class_WorksContract.php
@@ -19,7 +19,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
+ * along with this program. If not, see .
*/
class WorksContract extends BaseFrameworkSystem implements SignableContract {
// Zukuenftiger Schiffsname
@@ -41,20 +41,12 @@ class WorksContract extends BaseFrameworkSystem implements SignableContract {
private $merchantInstance = null;
// Konstruktor
- private function __construct () {
+ protected function __construct () {
// Call parent constructor
- parent::constructor(__CLASS__);
-
- // Debug message
- if (((defined('DEBUG_CONTRACT')) || (defined('DEBUG_ALL'))) && (defined('DEBUG_CONSTRUCT'))) {
- $this->getDebugInstance()->output(sprintf("[%s:%d] Konstruktor erreicht.
\n",
- __CLASS__,
- __LINE__
- ));
- }
+ parent::__construct(__CLASS__);
// Set description
- $this->setPartDescr("Bauvertrag");
+ $this->setObjectDescription("Bauvertrag");
// Unique-ID generieren
$this->createUniqueID();
@@ -89,7 +81,7 @@ class WorksContract extends BaseFrameworkSystem implements SignableContract {
__CLASS__,
__LINE__,
$shipName,
- $partnerInstance->getPartDescr(),
+ $partnerInstance->getObjectDescription(),
$partnerInstance->getCompanyName()
));
@@ -99,7 +91,7 @@ class WorksContract extends BaseFrameworkSystem implements SignableContract {
// Existiert die Klasse ueberhaupt?
if (!class_exists($shipType)) {
// Klasse nicht gefunden
- throw new ClassNotFoundException ($shipType, 0);
+ throw new ClassNotFoundException ($shipType, self::EXCEPTION_CLASS_NOT_FOUND);
}
// Schiff-Instanz temporaer erzeugen und in den Bauvertrag einfuegen
@@ -250,7 +242,7 @@ class WorksContract extends BaseFrameworkSystem implements SignableContract {
$this->getShipInstance()->getShipName()
));
}
- } catch(ClassNotFoundException $e) {
+ } catch (ClassNotFoundException $e) {
// Throw it again...
throw new ClassNotFoundException($e->getMessage(), $e->getCode());
}
@@ -262,7 +254,7 @@ class WorksContract extends BaseFrameworkSystem implements SignableContract {
if ((defined('DEBUG_CONTRACT')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] %s kostet %s.
\n",
__CLASS__,
__LINE__,
- $instance->getPartDescr(),
+ $instance->getObjectDescription(),
$this->getMerchantInstance()->formatCurrency($price)
));
@@ -273,7 +265,7 @@ class WorksContract extends BaseFrameworkSystem implements SignableContract {
if ((defined('DEBUG_CONTRACT')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] %s wurde in den Bauvertrag aufgenommen.
\n",
__CLASS__,
__LINE__,
- $instance->getPartDescr()
+ $instance->getObjectDescription()
));
}
@@ -334,9 +326,9 @@ class WorksContract extends BaseFrameworkSystem implements SignableContract {
$this->getDebugInstance()->output(sprintf("[%s:%d] Die %s %s stimmt einem Bauvertrag über das %s %s zu.
\n",
__CLASS__,
__LINE__,
- $partnerInstance->getPartDescr(),
+ $partnerInstance->getObjectDescription(),
$partnerInstance->getCompanyName(),
- $this->getShipInstance()->getPartDescr(),
+ $this->getShipInstance()->getObjectDescription(),
$this->getShipInstance()->getShipName()
));
} else {
@@ -344,11 +336,11 @@ class WorksContract extends BaseFrameworkSystem implements SignableContract {
$this->getDebugInstance()->output(sprintf("[%s:%d] Die %s %s geht mit der %s %s einen Bauvertrag über das %s %s ein.
\n",
__CLASS__,
__LINE__,
- $partnerInstance->getPartDescr(),
+ $partnerInstance->getObjectDescription(),
$partnerInstance->getCompanyName(),
- $partyInstance->getPartDescr(),
+ $partyInstance->getObjectDescription(),
$partyInstance->getCompanyName(),
- $this->getShipInstance()->getPartDescr(),
+ $this->getShipInstance()->getObjectDescription(),
$this->getShipInstance()->getShipName()
));
}