ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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 {
34  }
35 
36  return $obj;
37  }
38 }
Class arFactory.
Create styles array
The data for the language used.
const PRIVATE_CONTRUCTOR
Class arException.