ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ReferenceId.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21namespace ILIAS\Data;
22
23use ilObject2;
24
33{
34 private int $ref_id;
35
36 public function __construct(int $ref_id)
37 {
38 $this->ref_id = $ref_id;
39 }
40
41 public function toInt(): int
42 {
43 return $this->ref_id;
44 }
45
46 public function toObjectId(): ObjectId
47 {
48 return new ObjectId(ilObject2::_lookupObjectId($this->ref_id));
49 }
50}
__construct(int $ref_id)
Definition: ReferenceId.php:36
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupObjectId(int $ref_id)