1 | <?php |
||
29 | class Target |
||
30 | { |
||
31 | /** |
||
32 | * @var string The resource type |
||
33 | */ |
||
34 | private $type; |
||
35 | /** |
||
36 | * @var mixed The resource identifier |
||
37 | */ |
||
38 | private $id; |
||
39 | |||
40 | /** |
||
41 | * Creates a new Target. |
||
42 | * |
||
43 | * @param string $type The resource type |
||
44 | * @param mixed $id The resource identifier |
||
45 | */ |
||
46 | 3 | public function __construct(string $type, $id) |
|
54 | |||
55 | /** |
||
56 | * Gets the identifier of the resource, usually a unique key. |
||
57 | * |
||
58 | * @return mixed The resource identifier |
||
59 | */ |
||
60 | 1 | public function getId() |
|
64 | |||
65 | /** |
||
66 | * Gets the type of resource, usually a domain class name. |
||
67 | * |
||
68 | * @return string The resource type |
||
69 | */ |
||
70 | 1 | public function getType(): string |
|
74 | |||
75 | /** |
||
76 | * A string representation of this object. |
||
77 | * |
||
78 | * @return string The string representation |
||
79 | */ |
||
80 | 1 | public function __toString(): string |
|
84 | } |
||
85 |