ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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 
20  public static function getInstance($class_name, $primary_key = 0, $additional_arguments = array()) {
24  $ref = new ReflectionClass($class_name);
25  if ($ref->isInstantiable()) {
26  $obj = $ref->newInstanceArgs(array_merge(array( $primary_key ), $additional_arguments));
27  if ($primary_key == 0) {
28  $obj = clone($obj);
29  }
30  } else {
32  }
33 
34  return $obj;
35  }
36 }
37 
38 ?>
Class arFactory.
Create styles array
The data for the language used.
const PRIVATE_CONTRUCTOR
Class arException.