refactor class structure

This commit is contained in:
Daniel Seifert 2020-05-26 16:12:17 +02:00
parent 0c36330610
commit 5465a7eebd
Signed by: DanielS
GPG Key ID: 8A7C4C6ED1915C6F
7 changed files with 102 additions and 18 deletions

View File

@ -0,0 +1,28 @@
<?php
/**
* This Software is the property of Data Development and is protected
* by copyright law - it is NOT Freeware.
*
* Any unauthorized use of this software without a valid license
* is a violation of the license agreement and will be prosecuted by
* civil and criminal law.
*
* http://www.shopmodule.com
*
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Max Buhe <support@shopmodule.com>
* @link http://www.oxidmodule.com
*/
namespace D3\PdfDocuments\Modules\Application\Model;
use D3\PdfDocuments\Application\Model\Interfaces\pdfdocuments_orderinvoice;
use D3\PdfDocuments\Application\Model\pdfDocuments_abstract;
class invoicePdf extends pdfDocuments_abstract implements pdfdocuments_orderinvoice
{
public function getTemplate(){
return 'invoice.tpl';
}
}

View File

@ -0,0 +1,29 @@
<?php
/**
* This Software is the property of Data Development and is protected
* by copyright law - it is NOT Freeware.
*
* Any unauthorized use of this software without a valid license
* is a violation of the license agreement and will be prosecuted by
* civil and criminal law.
*
* http://www.shopmodule.com
*
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Max Buhe <support@shopmodule.com>
* @link http://www.oxidmodule.com
*/
namespace D3\PdfDocuments\Application\Model\Interfaces;
interface pdfdocuments_generic
{
public function setFilename($sContent, $target, $sFilename);
public function saveOrderOnChanges();
public function getTemplate();
public function genPdf($sFilename, $iSelLang = 0, $target = 'I');
}

View File

@ -0,0 +1,25 @@
<?php
/**
* This Software is the property of Data Development and is protected
* by copyright law - it is NOT Freeware.
*
* Any unauthorized use of this software without a valid license
* is a violation of the license agreement and will be prosecuted by
* civil and criminal law.
*
* http://www.shopmodule.com
*
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Max Buhe <support@shopmodule.com>
* @link http://www.oxidmodule.com
*/
namespace D3\PdfDocuments\Application\Model\Interfaces;
interface pdfdocuments_order extends pdfdocuments_generic
{
public function setOrder(Order $order);
public function getOrder();
}

View File

@ -17,15 +17,9 @@
namespace D3\PdfDocuments\Application\Model\Interfaces;
interface pdfdocuments_generic
interface pdfdocuments_orderinvoice extends pdfdocuments_order
{
public function setFilename($sContent, $target, $sFilename);
public function setInvoiceNumber();
public function setInvoiceDate();
public function saveOrderOnChanges();
public function getTemplate();
}

View File

@ -1,6 +1,23 @@
<?php
namespace D3\PdfDocuments\Modules\Application\Model;
/**
* This Software is the property of Data Development and is protected
* by copyright law - it is NOT Freeware.
*
* Any unauthorized use of this software without a valid license
* is a violation of the license agreement and will be prosecuted by
* civil and criminal law.
*
* http://www.shopmodule.com
*
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Max Buhe <support@shopmodule.com>
* @link http://www.oxidmodule.com
*/
namespace D3\PdfDocuments\Application\Model;
use D3\PdfDocuments\Application\Model\Interfaces\pdfdocuments_generic;
use \OxidEsales\Eshop\Application\Model\Order;
use OxidEsales\Eshop\Application\Model\Payment;
use OxidEsales\Eshop\Application\Model\User;
@ -8,7 +25,7 @@ use OxidEsales\Eshop\Core\Base;
use OxidEsales\Eshop\Core\Registry;
use Spipu\Html2Pdf\Html2Pdf;
abstract class pdfDocuments implements albatros
abstract class pdfDocuments_abstract implements pdfdocuments_generic
{
public $oOrder;
protected $blIsNewOrder;

View File

@ -1,9 +0,0 @@
<?php
namespace D3\PdfDocuments\Modules\Application\Model;
class invoicePdf extends pdfDocuments{
public function getTemplate(){
return 'invoice.tpl';
}
}