ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
◀ ilDoc Overview
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
array
Create styles array
The data for the language used.
Definition:
40duplicateStyle.php:19
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 Sat Jan 18 2025 19:01:25 for ILIAS by
1.8.13 (using
Doxyfile
)