19 declare(strict_types=1);
28 protected string $rid =
"";
33 protected int $obj_id,
34 protected string $type =
"" 41 public function init(
string $zipname =
""): string
43 if ($this->rid !==
"") {
44 throw $this->data->exportException(
"HTML Export has been initialised twice.");
46 if ($zipname ===
"") {
51 $this->rid = $this->repo->create(
69 if ($this->rid ===
"") {
70 throw $this->data->exportException(
"HTML Export has not been initialised.");
72 $this->repo->addString(
86 if ($this->rid ===
"") {
87 throw $this->data->exportException(
"HTML Export has not been initialised.");
103 if ($this->rid ===
"") {
104 throw $this->data->exportException(
"HTML Export has not been initialised.");
106 $this->repo->addDirectory(
114 string $source_container_id,
115 string $source_dir_path =
"",
116 string $target_dir_path =
"" 118 if ($this->rid ===
"") {
119 throw $this->data->exportException(
"HTML Export has not been initialised.");
121 $this->repo->addContainerDirToTargetContainer(
122 $source_container_id,
131 return $this->repo->getFilePath($this->rid);
136 $this->repo->deliverFile($this->rid);
139 public function delete():
void 141 $this->repo->delete($this->obj_id, $this->rid);
addFile(string $fullpath, string $target_path)
addDirectory(string $source_dir, string $target_path)
addContainerDirectory(string $source_container_id, string $source_dir_path="", string $target_dir_path="")
deliver(string $filename)
__construct(protected DataService $data, protected ExportFileDBRepository $repo, protected int $obj_id, protected string $type="")
static _lookupType(int $id, bool $reference=false)
addString(string $content, string $path)