refactor class structure
This commit is contained in:
parent
0c36330610
commit
5465a7eebd
28
Application/Model/Documents/invoicePdf.php
Normal file
28
Application/Model/Documents/invoicePdf.php
Normal 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';
|
||||||
|
}
|
||||||
|
}
|
29
Application/Model/Interfaces/pdfdocuments_generic.php
Normal file
29
Application/Model/Interfaces/pdfdocuments_generic.php
Normal 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');
|
||||||
|
}
|
25
Application/Model/Interfaces/pdfdocuments_order.php
Normal file
25
Application/Model/Interfaces/pdfdocuments_order.php
Normal 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();
|
||||||
|
}
|
@ -17,15 +17,9 @@
|
|||||||
|
|
||||||
namespace D3\PdfDocuments\Application\Model\Interfaces;
|
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 setInvoiceNumber();
|
||||||
|
|
||||||
public function setInvoiceDate();
|
public function setInvoiceDate();
|
||||||
|
|
||||||
public function saveOrderOnChanges();
|
|
||||||
|
|
||||||
public function getTemplate();
|
|
||||||
}
|
}
|
@ -1,6 +1,23 @@
|
|||||||
<?php
|
<?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\Order;
|
||||||
use OxidEsales\Eshop\Application\Model\Payment;
|
use OxidEsales\Eshop\Application\Model\Payment;
|
||||||
use OxidEsales\Eshop\Application\Model\User;
|
use OxidEsales\Eshop\Application\Model\User;
|
||||||
@ -8,7 +25,7 @@ use OxidEsales\Eshop\Core\Base;
|
|||||||
use OxidEsales\Eshop\Core\Registry;
|
use OxidEsales\Eshop\Core\Registry;
|
||||||
use Spipu\Html2Pdf\Html2Pdf;
|
use Spipu\Html2Pdf\Html2Pdf;
|
||||||
|
|
||||||
abstract class pdfDocuments implements albatros
|
abstract class pdfDocuments_abstract implements pdfdocuments_generic
|
||||||
{
|
{
|
||||||
public $oOrder;
|
public $oOrder;
|
||||||
protected $blIsNewOrder;
|
protected $blIsNewOrder;
|
@ -1,9 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace D3\PdfDocuments\Modules\Application\Model;
|
|
||||||
|
|
||||||
class invoicePdf extends pdfDocuments{
|
|
||||||
public function getTemplate(){
|
|
||||||
return 'invoice.tpl';
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user