ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
Handler.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
23use ILIAS\Export\ExportHandler\I\Target\HandlerInterface as ilExportHandlerTargetInterface;
24
25class Handler implements ilExportHandlerTargetInterface
26{
27 protected string $type;
28 protected array $object_ids;
29 protected string $target_release;
30 protected string $class_name;
31 protected string $component;
32
33 public function __construct()
34 {
35 $this->type = "";
36 $this->target_release = "";
37 $this->class_name = "";
38 $this->component = "";
39 $this->object_ids = [];
40 }
41
42 public function withType(string $type): ilExportHandlerTargetInterface
43 {
44 $clone = clone $this;
45 $clone->type = $type;
46 return $clone;
47 }
48
49 public function withObjectIds(array $object_ids): ilExportHandlerTargetInterface
50 {
51 $clone = clone $this;
52 $clone->object_ids = $object_ids;
53 return $clone;
54 }
55
56 public function withTargetRelease(string $target_release): ilExportHandlerTargetInterface
57 {
58 $clone = clone $this;
59 $clone->target_release = $target_release;
60 return $clone;
61 }
62
63 public function withClassname(string $classname): ilExportHandlerTargetInterface
64 {
65 $clone = clone $this;
66 $clone->class_name = $classname;
67 return $clone;
68 }
69
70 public function withComponent(string $component): ilExportHandlerTargetInterface
71 {
72 $clone = clone $this;
73 $clone->component = $component;
74 return $clone;
75 }
76
77 public function getType(): string
78 {
79 return $this->type;
80 }
81
82 public function getObjectIds(): array
83 {
84 return $this->object_ids;
85 }
86
87 public function getTargetRelease(): string
88 {
90 }
91
92 public function getClassname(): string
93 {
94 return $this->class_name;
95 }
96
97 public function getComponent(): string
98 {
99 return $this->component;
100 }
101}
withTargetRelease(string $target_release)
Definition: Handler.php:56