ILIAS
trunk Revision v11.0_alpha-1715-g7fc467680fb
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
+
Variables
$
c
e
g
h
j
l
m
p
s
t
u
v
+
Enumerations
a
c
e
f
i
j
l
m
n
o
p
r
s
t
u
v
z
+
Enumerator
a
c
d
e
f
g
i
l
m
n
o
p
q
s
t
u
v
y
+
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
+
Data Fields
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Ö
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Ö
Enumerations
Enumerator
+
Files
File List
+
Globals
+
All
$
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
z
+
Functions
a
b
c
d
e
f
g
h
i
m
n
p
r
s
t
u
v
+
Variables
$
a
c
e
g
h
i
m
n
o
p
r
s
t
u
v
z
Enumerations
Enumerator
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Enumerations
Enumerator
Modules
Pages
Context.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\File\Capabilities
;
22
26
class
Context
implements
\Stringable
27
{
28
public
const
CONTEXT_REPO
= 1;
29
public
const
CONTEXT_WORKSPACE
= 2;
30
31
public
function
__construct
(
32
private
int
$object_id,
33
private
int
$calling_id,
34
private
int
$context
35
) {
36
// $context mut be one of the constants
37
if
($context !== self::CONTEXT_REPO && $context !== self::CONTEXT_WORKSPACE) {
38
throw
new \InvalidArgumentException(
'Invalid context'
);
39
}
40
}
41
42
public
function
getObjectId
():
int
43
{
44
return
$this->object_id;
45
}
46
47
public
function
getCallingId
():
int
48
{
49
return
$this->calling_id;
50
}
51
52
public
function
getContext
():
int
53
{
54
return
$this->context
;
55
}
56
57
public
function
getNode
(): string
58
{
59
return
$this->
getContext
() .
'_'
. $this->
getCallingId
();
60
}
61
62
public
function
withCallingId
(
int
$calling_id): self
63
{
64
$clone = clone $this;
65
$clone->calling_id = $calling_id;
66
return
$clone;
67
}
68
69
public
function
withObjectId
(
int
$object_id): self
70
{
71
$clone = clone $this;
72
$clone->object_id = $object_id;
73
return
$clone;
74
}
75
76
public
function
__toString
(): string
77
{
78
return
(
string
) $this->
getCallingId
();
79
}
80
81
}
$context
$context
Definition:
webdav.php:31
ILIAS\File\Capabilities\Context\__toString
__toString()
Definition:
Context.php:76
ILIAS\File\Capabilities\Context\CONTEXT_REPO
const CONTEXT_REPO
Definition:
Context.php:28
ILIAS\File\Capabilities\Context\withObjectId
withObjectId(int $object_id)
Definition:
Context.php:69
ILIAS\File\Capabilities\Context\getNode
getNode()
Definition:
Context.php:57
ILIAS\File\Capabilities\Context\getCallingId
getCallingId()
Definition:
Context.php:47
ILIAS\File\Capabilities\Context\CONTEXT_WORKSPACE
const CONTEXT_WORKSPACE
Definition:
Context.php:29
ILIAS\File\Capabilities\Context\getContext
getContext()
Definition:
Context.php:52
ILIAS\File\Capabilities\Context\withCallingId
withCallingId(int $calling_id)
Definition:
Context.php:62
ILIAS\File\Capabilities
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition:
Capabilities.php:22
ILIAS\File\Capabilities\Context\__construct
__construct(private int $object_id, private int $calling_id, private int $context)
Definition:
Context.php:31
ILIAS\File\Capabilities\Context\getObjectId
getObjectId()
Definition:
Context.php:42
ILIAS\File\Capabilities\Context
Definition:
Context.php:26
ILIAS\Repository\int
int(string $key)
Definition:
trait.BaseGUIRequest.php:61
Stringable
components
ILIAS
File
classes
Capabilities
Context.php
Generated on Sat Apr 5 2025 23:02:54 for ILIAS by
1.8.13 (using
Doxyfile
)