16 include_once (
"FDL/import_file.php");
17 require_once
'FDL/exportxmlfld.php';
24 private $exported =
false;
25 private $outputFile =
'';
26 private $useIdentificator =
false;
30 private $format = self::xmlFormat;
43 if ($xy == self::zipFormat || $xy == self::xmlFormat) {
46 throw new Dcp\Exception(sprintf(
"format must be %s or %s") , self::zipFormat, self::xmlFormat);
63 return $this->outputFile;
65 private function setOutputFile($outputFile =
'')
69 if ($this->format == self::xmlFormat)
$ext =
"xml";
70 else if ($this->format == self::zipFormat)
$ext =
'zip';
71 $this->outputFile = uniqid(
getTmpDir() .
"/export") .
".$ext";
73 $this->outputFile = $outputFile;
75 return $this->outputFile;
84 if (!$this->exported) {
85 throw new Dcp\Exception(sprintf(_(
"nothing to export. Do export before")));
87 if ($this->format != self::xmlFormat) {
90 return file_get_contents($this->outputFile);
101 $this->setOutputFile($outputFile);
113 $this->setOutputFile($outputFile);
125 $this->setOutputFile($outputFile);
exportFromSelection(Fdl_DocumentSelection $selection, $outputFile= '')
exportxmlfld(Action &$action, $aflid="0", $famid="", SearchDoc $specSearch=null, $outputFile= '', $eformat="", $wident= 'Y', Fdl_DocumentSelection $aSelection=null, $toDownload=true)
Exception class use exceptionCode to identifiy correctly exception.
exportFromSearch(SearchDoc &$search, $outputFile= '')
useIdentificator($exportIdentificator=true)
exportFromFolder($folderId, $outputFile= '')