ILIAS
release_8 Revision v8.19
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
$
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
x
+
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
+
Variables
$
a
b
c
d
e
f
g
h
j
l
m
p
s
t
u
+
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
Ö
+
Files
File List
+
Globals
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
+
Functions
_
a
b
c
d
e
g
h
i
m
n
p
r
s
t
u
v
x
+
Variables
$
a
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
z
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Modules
Pages
class.arFactory.php
Go to the documentation of this file.
1
<?php
2
3
/******************************************************************************
4
*
5
* This file is part of ILIAS, a powerful learning management system.
6
*
7
* ILIAS is licensed with the GPL-3.0, you should have received a copy
8
* of said license along with the source code.
9
*
10
* If this is not the case or you just want to try ILIAS, you'll find
11
* us at:
12
* https://www.ilias.de
13
* https://github.com/ILIAS-eLearning
14
*
15
*****************************************************************************/
21
class
arFactory
22
{
27
public
static
function
getInstance(
string
$class_name, $primary_key = 0, array $additional_arguments = array()):
\ActiveRecord
28
{
29
$ref =
new
ReflectionClass
($class_name);
30
if
($ref->isInstantiable()) {
32
$obj = $ref->newInstanceArgs(array_merge(array($primary_key), $additional_arguments));
33
if
(empty($primary_key)) {
34
$obj = clone($obj);
35
}
36
}
else
{
37
throw
new
arException
(
arException::PRIVATE_CONTRUCTOR
);
38
}
39
40
return
$obj;
41
}
42
}
ActiveRecord
Class ActiveRecord.
Definition:
class.ActiveRecord.php:24
arFactory
Class arFactory.
Definition:
class.arFactory.php:21
arException\PRIVATE_CONTRUCTOR
const PRIVATE_CONTRUCTOR
Definition:
class.arException.php:33
arException
Class arException.
Definition:
class.arException.php:22
ReflectionClass
Services
ActiveRecord
Factory
class.arFactory.php
Generated on Tue Apr 1 2025 22:01:45 for ILIAS by
1.8.13 (using
Doxyfile
)