19declare(strict_types=1);
28 protected string $rid =
"";
34 protected int $obj_id,
35 protected string $type =
""
42 public function init(
string $zipname =
""): string
44 if ($this->rid !==
"") {
45 throw $this->data->exportException(
"HTML Export has been initialised twice.");
47 if ($zipname ===
"") {
52 $this->rid = $this->repo->create(
70 if ($this->rid ===
"") {
71 throw $this->data->exportException(
"HTML Export has not been initialised.");
73 $this->repo->addString(
87 if ($this->rid ===
"") {
88 throw $this->data->exportException(
"HTML Export has not been initialised.");
90 if (in_array($target_path, $this->paths_added,
true)) {
93 $this->paths_added[] = $target_path;
108 if ($this->rid ===
"") {
109 throw $this->data->exportException(
"HTML Export has not been initialised.");
111 $this->repo->addDirectory(
119 string $source_container_id,
120 string $source_dir_path =
"",
121 string $target_dir_path =
""
123 if ($this->rid ===
"") {
124 throw $this->data->exportException(
"HTML Export has not been initialised.");
126 $this->repo->addContainerDirToTargetContainer(
127 $source_container_id,
136 return $this->repo->getFilePath($this->rid);
141 $this->repo->deliverFile($this->rid);
144 public function delete():
void
146 $this->repo->delete($this->obj_id, $this->rid);
addDirectory(string $source_dir, string $target_path)
addFile(string $fullpath, string $target_path)
addString(string $content, string $path)
__construct(protected DataService $data, protected ExportFileDBRepository $repo, protected int $obj_id, protected string $type="")
addContainerDirectory(string $source_container_id, string $source_dir_path="", string $target_dir_path="")
deliver(string $filename)
static _lookupType(int $id, bool $reference=false)
if(!file_exists('../ilias.ini.php'))