ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
class.ilLMTree.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2014 ILIAS open source, Extended GPL, see docs/LICENSE */
4
12class ilLMTree extends ilTree
13{
14 static $instances = array();
15
21 private function __construct($a_tree_id)
22 {
23 parent::ilTree($a_tree_id);
24 $this->setTableNames('lm_tree','lm_data');
25 $this->setTreeTablePK("lm_id");
26 $this->useCache(true);
27 }
28
35 static function getInstance($a_tree_id)
36 {
37 if (isset(self::$instances[$a_tree_id]))
38 {
39 return self::$instances[$a_tree_id];
40 }
41 $tree = new ilLMTree($a_tree_id);
42 self::$instances[$a_tree_id] = $tree;
43
44 return $tree;
45 }
46
47
52 public function isCacheUsed()
53 {
54 return $this->use_cache;
55 }
56
57
58}
59
60?>
static getInstance($a_tree_id)
Get Instance.
__construct($a_tree_id)
Constructor.
isCacheUsed()
Check if cache is active.
static $instances
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
useCache($a_use=true)
Use Cache (usually activated)
setTreeTablePK($a_column_name)
set column containing primary key in tree table @access public
setTableNames($a_table_tree, $a_table_obj_data, $a_table_obj_reference="")
set table names The primary key of the table containing your object_data must be 'obj_id' You may use...