ILIAS  release_7 Revision v7.30-3-g800a261c036
ReferenceId.php
Go to the documentation of this file.
1<?php namespace ILIAS\Data;
2
3use ilObject2;
4
13{
14
18 private $ref_id;
19
20
26 public function __construct(int $ref_id)
27 {
28 $this->ref_id = $ref_id;
29 }
30
31
37 public function toInt() : int
38 {
39 return (int) $this->ref_id;
40 }
41
42
46 public function toObjectId() : ObjectId
47 {
48 return new ObjectId((int) ilObject2::_lookupObjectId($this->ref_id));
49 }
50}
An exception for terminatinating execution or to throw for unit testing.
toInt()
Get the password-string.
Definition: ReferenceId.php:37
__construct(int $ref_id)
ReferenceId constructor.
Definition: ReferenceId.php:26
Class ilObject2 This is an intermediate progress of ilObject class.
static _lookupObjectId($a_ref_id)
lookup object id