ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ReferenceId.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
5 namespace ILIAS\Data;
6 
7 use 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 }
static _lookupObjectId(int $ref_id)
__construct(int $ref_id)
Definition: ReferenceId.php:20