init
This commit is contained in:
1059
modules/EcmReports/optima/ExportOptima.php
Normal file
1059
modules/EcmReports/optima/ExportOptima.php
Normal file
File diff suppressed because it is too large
Load Diff
43
modules/EcmReports/optima/OptimaXML.php
Normal file
43
modules/EcmReports/optima/OptimaXML.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
require_once 'modules/EcmReports/optima/OptimaXMLConstant.php';
|
||||
|
||||
class OptimaXML{
|
||||
|
||||
private $sugarSmarty;
|
||||
public $basicXML;
|
||||
private $content;
|
||||
private $dom;
|
||||
|
||||
public function __construct(){
|
||||
$this->sugarSmarty= new Sugar_Smarty();
|
||||
$this->dom= new DOMDocument;
|
||||
|
||||
}
|
||||
|
||||
public function generateStartXMl(){
|
||||
$this->sugarSmarty->assign("WERSJA",OptimaXMLConstant::WERSJA);
|
||||
$this->sugarSmarty->assign("BAZA_ZRD_ID",OptimaXMLConstant::BAZA_ZRD_ID);
|
||||
$this->sugarSmarty->assign("BAZA_DOC_ID",OptimaXMLConstant::BAZA_DOC_ID);
|
||||
|
||||
$this->content=$this->sugarSmarty->fetch(OptimaXMLConstant::FILE_PATH);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function loadXml(){
|
||||
|
||||
$this->dom->loadXML($this->content);
|
||||
|
||||
$this->basicXML=simplexml_import_dom($this->dom);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getXmlNode(){
|
||||
return $this->basicXML;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
9
modules/EcmReports/optima/OptimaXMLConstant.php
Normal file
9
modules/EcmReports/optima/OptimaXMLConstant.php
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
class OptimaXMLConstant{
|
||||
|
||||
const WERSJA = '2.00';
|
||||
const BAZA_ZRD_ID='SPR';
|
||||
const BAZA_DOC_ID='KSI';
|
||||
const FILE_PATH='modules/EcmReports/tpls/test_2.xml.html';
|
||||
}
|
||||
1310
modules/EcmReports/optima/xmptemplate/test_2.xml.html
Executable file
1310
modules/EcmReports/optima/xmptemplate/test_2.xml.html
Executable file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user