ILIAS  release_7 Revision v7.30-3-g800a261c036
ResourceIdentification.php
Go to the documentation of this file.
1<?php declare(strict_types=1);
2
4
5use Serializable;
6
14class ResourceIdentification implements Serializable
15{
16
20 private $unique_id;
21
22
28 public function __construct(string $unique_id)
29 {
30 $this->unique_id = $unique_id;
31 }
32
33
37 public function serialize() : string
38 {
39 return $this->unique_id;
40 }
41
42
46 public function unserialize($serialized) : void
47 {
48 $this->unique_id = $serialized;
49 }
50
51
55 public function __toString()
56 {
57 return $this->serialize();
58 }
59}
An exception for terminatinating execution or to throw for unit testing.
__construct(string $unique_id)
ResourceIdentification constructor.