Method constructor() removed, several small fixes
[shipsimu.git] / application / ship-simu / main / companies / class_ShippingCompany.php
index d8c042550b275b9e701d0ad5b0b1c9ee0f1175b5..b93efdb8efc1804cf880bf4866a5ba1aa8414d16 100644 (file)
@@ -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 <http://www.gnu.org/licenses/>.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
 class ShippingCompany extends BaseSimulator implements Customer, ContractPartner {
        /**
@@ -67,9 +67,9 @@ class ShippingCompany extends BaseSimulator implements Customer, ContractPartner
         *
         * @return      void
         */
-       private function __construct () {
+       protected function __construct () {
                // Call parent constructor
-               parent::constructor(__CLASS__);
+               parent::__construct(__CLASS__);
 
                // Debug message
                if (((defined('DEBUG_COMPANY')) || (defined('DEBUG_ALL'))) && (defined('DEBUG_CONSTRUCT'))) {
@@ -80,7 +80,7 @@ class ShippingCompany extends BaseSimulator implements Customer, ContractPartner
                }
 
                // Set description
-               $this->setPartDescr("Reederei");
+               $this->setObjectDescription("Reederei");
 
                // Generate unique ID number
                $this->createUniqueID();
@@ -229,7 +229,7 @@ class ShippingCompany extends BaseSimulator implements Customer, ContractPartner
                        $employeeInstance->getSurname(),
                        $employeeInstance->getFamily(),
                        $this->getCompanyName(),
-                       $employeeInstance->getPartDescr(),
+                       $employeeInstance->getObjectDescription(),
                        $this->formatCurrency($employeeInstance->getSalary())
                ));
                $this->employeeList->append($employeeInstance);
@@ -301,7 +301,7 @@ class ShippingCompany extends BaseSimulator implements Customer, ContractPartner
 
                        // Make this person employed and give him some money to work
                        $employee->setEmployed(true);
-                       $employee->setPartDescr($dummy->getPartDescr());
+                       $employee->setObjectDescription($dummy->getObjectDescription());
                        $employee->setRealClass($dummy->__toString());
                        $employee->increaseSalary((mt_rand(7, 14) * 100)); // Are 700 to 1400 EUR for the begin okay?
 
@@ -448,7 +448,7 @@ class ShippingCompany extends BaseSimulator implements Customer, ContractPartner
                        __CLASS__,
                        __LINE__,
                        $this->getCompanyName(),
-                       $shipInstance->getPartDescr()
+                       $shipInstance->getObjectDescription()
                ));
 
                // Iterate shipyard list
@@ -503,7 +503,7 @@ class ShippingCompany extends BaseSimulator implements Customer, ContractPartner
                        __LINE__,
                        $this->getCompanyName(),
                        $contractInstance->getShipName(),
-                       $shipInstance->getPartDescr()
+                       $shipInstance->getObjectDescription()
                ));
 
                // Now check if the ship type is in any list and return the result
@@ -568,7 +568,7 @@ class ShippingCompany extends BaseSimulator implements Customer, ContractPartner
                        __CLASS__,
                        __LINE__,
                        $this->getCompanyName(),
-                       $contractInstance->getShipInstance()->getPartDescr(),
+                       $contractInstance->getShipInstance()->getObjectDescription(),
                        $contractInstance->getShipInstance()->getShipName()
                ));
                $this->contractList->append($contractInstance);
@@ -606,7 +606,7 @@ class ShippingCompany extends BaseSimulator implements Customer, ContractPartner
                                __CLASS__,
                                __LINE__,
                                $this->getCompanyName(),
-                               $contractInstance->getShipInstance()->getPartDescr(),
+                               $contractInstance->getShipInstance()->getObjectDescription(),
                                $contractInstance->getShipInstance()->getShipName()
                        ));
                } else {
@@ -615,7 +615,7 @@ class ShippingCompany extends BaseSimulator implements Customer, ContractPartner
                                __CLASS__,
                                __LINE__,
                                $this->getCompanyName(),
-                               $contractInstance->getShipInstance()->getPartDescr(),
+                               $contractInstance->getShipInstance()->getObjectDescription(),
                                $contractInstance->getShipInstance()->getShipName(),
                                $partnerInstance->getCompanyName()
                        ));