More renamed
[shipsimu.git] / application / ship-simu / main / class_WorksContract.php
index 424cd8b77affc288c0d5e31ae6b6553c9d8c7f4a..bbe2f35aaad07e1fddf0156b640647d5057507bc 100644 (file)
@@ -2,11 +2,11 @@
 /**
  * The work constract class which can be used for contract parties
  *
- * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
  * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 Ship-Simu Developer Team
  * @license            GNU GPL 3.0 or any newer version
- * @link               http://www.ship-simu.org
+ * @link               http://www.shipsimu.org
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -44,14 +44,10 @@ class WorksContract extends BaseFrameworkSystem implements SignableContract {
        protected function __construct () {
                // Call parent constructor
                parent::__construct(__CLASS__);
-
-               // Clean up a little
-               $this->removeSystemArray();
-               $this->removeNumberFormaters();
        }
 
        // Neuen Bauvertrag generieren
-       public final static function createWorksContract ($shipType, $shipName, ContractPartner $partnerInstance) {
+       public static final function createWorksContract ($shipType, $shipName, ContractPartner $partnerInstance) {
                // Strings absichern
                $shipType = (string) $shipType;
                $shipName = (string) $shipName;
@@ -65,7 +61,7 @@ class WorksContract extends BaseFrameworkSystem implements SignableContract {
                // Existiert die Klasse ueberhaupt?
                if (!class_exists($shipType)) {
                        // Klasse nicht gefunden
-                       throw new ClassNotFoundException ($shipType, self::EXCEPTION_CLASS_NOT_FOUND);
+                       throw new NoClassException ($shipType, self::EXCEPTION_CLASS_NOT_FOUND);
                }
 
                // Schiff-Instanz temporaer erzeugen und in den Bauvertrag einfuegen
@@ -144,9 +140,9 @@ class WorksContract extends BaseFrameworkSystem implements SignableContract {
                                        $this->getShipInstance()->getShipName()
                                ));
                        }
-               } catch (ClassNotFoundException $e) {
+               } catch (NoClassException $e) {
                        // Throw it again...
-                       throw new ClassNotFoundException($e->getMessage(), $e->getCode());
+                       throw new NoClassException($e->getMessage(), $e->getCode());
                }
 
                // Get price for this item