ILIAS  release_8 Revision v8.24
ReferenceId.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
5namespace ILIAS\Data;
6
7use ilObject2;
8
17{
18 private int $ref_id;
19
20 public function __construct(int $ref_id)
21 {
22 $this->ref_id = $ref_id;
23 }
24
25 public function toInt(): int
26 {
27 return $this->ref_id;
28 }
29
30 public function toObjectId(): ObjectId
31 {
32 return new ObjectId(ilObject2::_lookupObjectId($this->ref_id));
33 }
34}
__construct(int $ref_id)
Definition: ReferenceId.php:20
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupObjectId(int $ref_id)