ILIAS
release_7 Revision v7.30-3-g800a261c036
◀ 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
p
r
s
t
w
+
Functions
_
a
b
c
f
g
h
i
r
s
t
w
+
Variables
$
c
d
e
f
g
h
j
l
m
p
s
t
+
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
q
r
s
t
u
v
w
x
z
+
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
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Modules
Pages
class.arFactory.php
Go to the documentation of this file.
1
<?php
2
require_once(dirname(__FILE__) .
'/../Exception/class.arException.php'
);
3
10
class
arFactory
11
{
12
21
public
static
function
getInstance($class_name, $primary_key = 0, $additional_arguments = array())
22
{
26
$ref =
new
ReflectionClass
($class_name);
27
if
($ref->isInstantiable()) {
28
$obj = $ref->newInstanceArgs(array_merge(array( $primary_key ), $additional_arguments));
29
if
($primary_key == 0) {
30
$obj = clone($obj);
31
}
32
}
else
{
33
throw
new
arException
(
arException::PRIVATE_CONTRUCTOR
);
34
}
35
36
return
$obj;
37
}
38
}
arFactory
Class arFactory.
Definition:
class.arFactory.php:10
arException\PRIVATE_CONTRUCTOR
const PRIVATE_CONTRUCTOR
Definition:
class.arException.php:22
arException
Class arException.
Definition:
class.arException.php:11
ReflectionClass
Services
ActiveRecord
Factory
class.arFactory.php
Generated on Fri Apr 4 2025 21:01:15 for ILIAS by
1.8.13 (using
Doxyfile
)