* 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 WorksContract extends BaseFrameworkSystem implements SignableContract {
// Zukuenftiger Schiffsname
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.<br />\n",
- __CLASS__,
- __LINE__
- ));
- }
+ parent::__construct(__CLASS__);
// Set description
- $this->setPartDescr("Bauvertrag");
+ $this->setObjectDescription("Bauvertrag");
// Unique-ID generieren
$this->createUniqueID();
__CLASS__,
__LINE__,
$shipName,
- $partnerInstance->getPartDescr(),
+ $partnerInstance->getObjectDescription(),
$partnerInstance->getCompanyName()
));
// 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
$this->getShipInstance()->getShipName()
));
}
- } catch(ClassNotFoundException $e) {
+ } catch (ClassNotFoundException $e) {
// Throw it again...
throw new ClassNotFoundException($e->getMessage(), $e->getCode());
}
if ((defined('DEBUG_CONTRACT')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] <strong>%s</strong> kostet <strong>%s</strong>.<br />\n",
__CLASS__,
__LINE__,
- $instance->getPartDescr(),
+ $instance->getObjectDescription(),
$this->getMerchantInstance()->formatCurrency($price)
));
if ((defined('DEBUG_CONTRACT')) || (defined('DEBUG_ALL'))) $this->getDebugInstance()->output(sprintf("[%s:%d] <strong>%s</strong> wurde in den Bauvertrag aufgenommen.<br />\n",
__CLASS__,
__LINE__,
- $instance->getPartDescr()
+ $instance->getObjectDescription()
));
}
$this->getDebugInstance()->output(sprintf("[%s:%d] Die <strong>%s</strong> <em><strong>%s</strong></em> stimmt einem Bauvertrag über das <strong>%s</strong> <em><strong>%s</strong></em> zu.<br />\n",
__CLASS__,
__LINE__,
- $partnerInstance->getPartDescr(),
+ $partnerInstance->getObjectDescription(),
$partnerInstance->getCompanyName(),
- $this->getShipInstance()->getPartDescr(),
+ $this->getShipInstance()->getObjectDescription(),
$this->getShipInstance()->getShipName()
));
} else {
$this->getDebugInstance()->output(sprintf("[%s:%d] Die <strong>%s</strong> <em><strong>%s</strong></em> geht mit der <strong>%s</strong> <em><strong>%s</strong></em> einen Bauvertrag über das <strong>%s</strong> <em><strong>%s</strong></em> ein.<br />\n",
__CLASS__,
__LINE__,
- $partnerInstance->getPartDescr(),
+ $partnerInstance->getObjectDescription(),
$partnerInstance->getCompanyName(),
- $partyInstance->getPartDescr(),
+ $partyInstance->getObjectDescription(),
$partyInstance->getCompanyName(),
- $this->getShipInstance()->getPartDescr(),
+ $this->getShipInstance()->getObjectDescription(),
$this->getShipInstance()->getShipName()
));
}
// Return total price
return $totalPrice;
}
-
- /**
- * Stub!
- */
- public function saveObjectToDatabase () {
- $this->getDebugInstance()->output(sprintf("[%s:] Stub <strong>%s</strong> erreicht.",
- $this->__toString(),
- __FUNCTION__
- ));
- }
}
// [EOF]