ILIAS  trunk Revision v11.0_alpha-1744-gb0451eebef4
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
Handler.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
23 use ILIAS\Poll\Image\I\Repository\Stakeholder\HandlerInterface as ilPollImageRepositoryStakeholderInterface;
25 
26 class Handler extends AbstractResourceStakeholder implements ilPollImageRepositoryStakeholderInterface
27 {
28  protected int $owner_id;
29 
30  public function __construct()
31  {
32  }
33 
34  public function withUserId(
35  int $user_id
36  ): ilPollImageRepositoryStakeholderInterface {
37  $clone = clone $this;
38  $clone->owner_id = $user_id;
39  return $clone;
40  }
41 
42  public function getUserId(): int
43  {
44  return $this->owner_id;
45  }
46 
47  public function getId(): string
48  {
49  return "poll_img";
50  }
51 
52  public function getOwnerOfNewResources(): int
53  {
54  return $this->owner_id ?? 6;
55  }
56 }
__construct()
Constructor must not have any parameters.
Definition: Handler.php:30