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
Handler.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\MetaData\Copyright\Identifiers
;
22
23
class
Handler
implements
HandlerInterface
24
{
25
public
function
buildIdentifierFromEntryID
(
int
$entry_id): string
26
{
27
return
'il_copyright_entry__'
. $this->
getInstID
() .
'__'
. $entry_id;
28
}
29
30
public
function
isIdentifierValid
(
string
$identifier): bool
31
{
32
if
(!preg_match(
'/il_copyright_entry__([0-9]+)__([0-9]+)/'
, $identifier, $matches)) {
33
return
false
;
34
}
35
if
(($matches[1] ??
''
) !== $this->
getInstID
()) {
36
return
false
;
37
}
38
return
true
;
39
}
40
41
public
function
parseEntryIDFromIdentifier
(
string
$identifier):
int
42
{
43
if
(!preg_match(
'/il_copyright_entry__([0-9]+)__([0-9]+)/'
, $identifier, $matches)) {
44
return
0;
45
}
46
if
(($matches[1] ??
''
) !== $this->
getInstID
()) {
47
return
0;
48
}
49
return
(
int
) ($matches[2] ?? 0);
50
}
51
52
protected
function
getInstID
(): string
53
{
54
return
(
string
)
IL_INST_ID
;
55
}
56
}
IL_INST_ID
const IL_INST_ID
Definition:
constants.php:40
Handler
ILIAS\MetaData\Copyright\Identifiers\Handler\isIdentifierValid
isIdentifierValid(string $identifier)
Definition:
Handler.php:30
ILIAS\MetaData\Copyright\Identifiers\Handler\buildIdentifierFromEntryID
buildIdentifierFromEntryID(int $entry_id)
Definition:
Handler.php:25
ILIAS\MetaData\Copyright\Identifiers\Handler\getInstID
getInstID()
Definition:
Handler.php:52
ILIAS\MetaData\Copyright\Identifiers\Handler\parseEntryIDFromIdentifier
parseEntryIDFromIdentifier(string $identifier)
Definition:
Handler.php:41
ILIAS\MetaData\Copyright\Identifiers\HandlerInterface
Definition:
HandlerInterface.php:23
ILIAS\MetaData\Copyright\Identifiers
Definition:
Handler.php:21
ILIAS\Repository\int
int(string $key)
Definition:
trait.BaseGUIRequest.php:61
components
ILIAS
MetaData
classes
Copyright
Identifiers
Handler.php
Generated on Sat Apr 5 2025 23:02:21 for ILIAS by
1.8.13 (using
Doxyfile
)